Jammy (Jam)

PyPI PyPI - License GitHub code GitLab code Read the Docs PyPI - Python Version Code style: black

A personal toolbox by Qsh.zh.

Usage

setup

  • For core package, run pip install jammy

  • To access functions in bin

    git clone https://gitlab.com/qsh.zh/jam.git --recursive
    export PATH=<path_to_jam>/bin:$PATH
    # run python program
    jam-run main.py
    jam-crun 1 main.py # use second nvidia gpu
    

sample of io

import jammy.io as jio
from jamtorch.utils import as_numpy
jio.dump("ndarray.npz", np.arange(10))
jio.dump("foo.pkl", {"foo": as_numpy(torch.arange(10).cuda())})
ndarray = jio.load("ndarray.npz")
jio.load("foo.pkl")
model_dict = jio.load("checkpoint.pth")
$ jinspect-file foo.pkl
> python3
[ins] print(f1)
# content of foo.pkl

Advanced Usage

Etymology

MICS

  • The package and framework are inspired from Jacinle by vacancy, from which I learn and take utility functions shamelessly.

Package Reference

Indices and tables