Metadata-Version: 2.3
Name: jammy
Version: 0.1.45
Summary: A Versatile ToolBox
Project-URL: Documentation, https://jammy.readthedocs.io/en/latest/
Author-email: Qin <qsh.zh27@gmail.com>
License: MIT
Requires-Python: <=3.12,>=3.8.1
Requires-Dist: einops>=0.6.0
Requires-Dist: filelock>=3.8.0
Requires-Dist: gitpython>=3.1.17
Requires-Dist: gpustat>=0.6.0
Requires-Dist: hydra-core>=1.2.1
Requires-Dist: ipdb>=0.13.8
Requires-Dist: loguru>=0.7.0
Requires-Dist: matplotlib>=3.7.1
Requires-Dist: numpy>=1.24.1
Requires-Dist: scipy>=1.10.1
Requires-Dist: stackprinter>=0.2.10
Requires-Dist: timeout-decorator>=0.5.0
Requires-Dist: tqdm>=4.11.0
Provides-Extra: all
Requires-Dist: h5py>=3.4.0; extra == 'all'
Requires-Dist: lightning>=2.0.0; extra == 'all'
Requires-Dist: line-profiler>=3.3.1; extra == 'all'
Requires-Dist: lmdb>=1.2.1; extra == 'all'
Requires-Dist: msgpack-numpy>=0.4.7; extra == 'all'
Requires-Dist: msgpack>=1.0.2; extra == 'all'
Requires-Dist: parse>=1.19.0; extra == 'all'
Requires-Dist: plotly>=5.20.0; extra == 'all'
Requires-Dist: pudb>=2022.1; extra == 'all'
Requires-Dist: pyarrow>=6.0.0; extra == 'all'
Requires-Dist: python-memcached>=1.59; extra == 'all'
Requires-Dist: pyzmq>=22.3.0; extra == 'all'
Requires-Dist: torch>=2.0.0; extra == 'all'
Requires-Dist: torchinfo>=1.5.3; extra == 'all'
Requires-Dist: torchvision>=0.15.0; extra == 'all'
Requires-Dist: tornado>=6.1; extra == 'all'
Requires-Dist: ubelt>=0.10.2; extra == 'all'
Requires-Dist: wandb>=0.10.31; extra == 'all'
Provides-Extra: dev
Requires-Dist: black>=21.5b1; extra == 'dev'
Requires-Dist: isort>=5.8.0; extra == 'dev'
Requires-Dist: m2r2>=0.3.1; extra == 'dev'
Requires-Dist: pallets-sphinx-themes>=2.0.1; extra == 'dev'
Requires-Dist: pre-commit>=2.13.0; extra == 'dev'
Requires-Dist: pylint>=2.8.3; extra == 'dev'
Requires-Dist: pytest>=7.4.3; extra == 'dev'
Requires-Dist: sphinx-tabs>=3.2.0; extra == 'dev'
Requires-Dist: sphinx>=4.2.0; extra == 'dev'
Provides-Extra: learn
Requires-Dist: wandb>=0.10.31; extra == 'learn'
Provides-Extra: pro
Requires-Dist: line-profiler>=3.3.1; extra == 'pro'
Requires-Dist: parse>=1.19.0; extra == 'pro'
Requires-Dist: pudb>=2022.1; extra == 'pro'
Requires-Dist: ubelt>=0.10.2; extra == 'pro'
Provides-Extra: storage
Requires-Dist: h5py>=3.4.0; extra == 'storage'
Requires-Dist: lmdb>=1.2.1; extra == 'storage'
Requires-Dist: msgpack-numpy>=0.4.7; extra == 'storage'
Requires-Dist: msgpack>=1.0.2; extra == 'storage'
Requires-Dist: pyarrow>=6.0.0; extra == 'storage'
Requires-Dist: python-memcached>=1.59; extra == 'storage'
Provides-Extra: torch
Requires-Dist: lightning>=2.0.0; extra == 'torch'
Requires-Dist: torch>=2.0.0; extra == 'torch'
Requires-Dist: torchinfo>=1.5.3; extra == 'torch'
Requires-Dist: torchvision>=0.15.0; extra == 'torch'
Requires-Dist: wandb>=0.10.31; extra == 'torch'
Provides-Extra: viz
Requires-Dist: plotly>=5.20.0; extra == 'viz'
Provides-Extra: web
Requires-Dist: pyzmq>=22.3.0; extra == 'web'
Requires-Dist: tornado>=6.1; extra == 'web'
Description-Content-Type: text/markdown

<h1 align="center"> Jammy (Jam) </h1>

<p align="center">
  <a href="https://pypi.org/project/jammy/">
    <img src="https://img.shields.io/pypi/v/jammy?style=for-the-badge" alt="PyPI" />
  </a>
  <a href="#">
    <img src="https://img.shields.io/pypi/l/jammy?style=for-the-badge" alt="PyPI - License" />
  </a>
  <a href="https://github.com/qsh-zh/jam">
    <img src="https://img.shields.io/badge/-github-grey?style=for-the-badge&logo=github" alt="GitHub code" />
  </a>
  <a href="https://gitlab.com/qsh.zh/jam">
    <img src="https://img.shields.io/badge/-gitlab-grey?style=for-the-badge&logo=gitlab" alt="GitLab code" />
  </a>
  <a href="https://jammy.readthedocs.io/en/stable/index.html">
    <img src="https://img.shields.io/readthedocs/jammy?style=for-the-badge" alt="Read the Docs" />
  </a>
  <a href="#">
    <img src="https://img.shields.io/pypi/pyversions/jammy?style=for-the-badge" alt="PyPI - Python Version" />
  </a>
  <a href="https://github.com/psf/black">
    <img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge" alt="Code style: black" />
  </a>
  <p align="center">
    <i>A personal toolbox by <a href="https://qsh-zh.github.io/">Qsh.zh</a>.</i>
  </p>
</p>

### Usage

#### setup

* For core package, run `pip install jammy`
* To access functions in `bin`
```shell
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
```python
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")
```
```shell
$ jinspect-file foo.pkl
> python3
[ins] print(f1)
# content of foo.pkl

```

### Advanced Usage

* [A DDP pytorch training framework](https://jammy.readthedocs.io/en/stable/jamtorch.ddp.html)
* [Registry](https://jammy.readthedocs.io/en/stable/jammy.utils.html?highlight=registry#jammy.utils.registry.CallbackRegistry)
* TODO

### Etymology
* The naming is inspired from [Jyutping](https://en.wikipedia.org/wiki/Jyutping) of [Qin](https://en.wiktionary.org/wiki/%E6%AC%BD).

### MICS

* The package and framework are inspired from [Jacinle](https://github.com/vacancy/Jacinle) by [vacancy](https://github.com/vacancy), from which I learn and take utility functions shamelessly.
