Installation

  • The easiest way to install pompon is to use pip.

    $ python -m venv pompon-env
    $ pip install git+https://github.com/KenHino/Pompon
  • We recommend install pompon from source using uv

    Clone the repository to your local environment;

    $ git clone https://github.com/KenHino/Pompon.git
    $ cd Pompon
    $ uv version
    uv 0.4.18 (7b55e9790 2024-10-01)
    $ uv sync --all-extras

    will install all dependencies including development tools. If you need only the runtime dependencies, you can use uv sync --no-dev.

    Then, you can use Pompon by

    $ uv run python xxx.py

    or

    $ souce .venv/bin/activate
    $ python
    >>> import pompon

    For jupyter notebook tutorials, you can use

    $ uv run jupyter lab

For GPU users

Pompon works both on CPU and GPU. If you treat large-scale batch or model, we recommend using GPU. See also JAX’s GPU support.

  1. Make sure the latest NVIDIA driver is installed.

    $ /usr/local/cuda/bin/nvcc -V
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2024 NVIDIA Corporation
    Built on Wed_Apr_17_19:19:55_PDT_2024
    Cuda compilation tools, release 12.5, V12.5.40
    Build cuda_12.5.r12.5/compiler.34177558_0
  2. Install GPU-supported JAX in your virtual envirionment.

    $ uv pip install -U "jax[cuda12]"
    $ uv run python -c "import jax; print(jax.default_backend())"
    'gpu'

Documentation

Our documentation is built by Quarto.

$ cd docs
$ make all

Then, open docs/_web/index.html in your browser. If you publish the documentation, you can use uv run quarto publish command. (Brefore publishing, you should check the documentation by uv run quarto preview.)

Testing

$ cd tests/build
$ uv run pytest ..

For developers

You should install pre-commit hooks including ruff formatting and linting, mypy type checking, pytest testing, and so on.

$ uv run pre-commit install
$ git add .
$ uv run pre-commit

Before push, you must fix problems!!

Please feel free to give us feedback or pull requests.