Development
Note
We are using both Anaconda and Poetry for dependency management - as different platforms require different versions of PyTorch (and its related packages). Also, non-Python packages, i.e., pytorch-cuda (previously named cudatoolkit) and ffmpeg, etc., are installed via Anaconda. We manage other pure-Python dependencies using Poetry.
Install Poetry
We recommend using pipx for installing Poetry:
Install Poetry on with pipx:
Virtual environment with Anaconda
PyTorch related dependencies are defined in environment.yml:
Then activate the environment:
Mamba (drop-in replacement for conda) is also supported and is what we use.
Install dependencies with Poetry
Install remaining dependencies with Poetry inside the conda-created virtual environment:
Also install pre-commit hooks:
# Install pre-commit hooks
pre-commit install
# Run against all files if you want
pre-commit run --all-files
Running tests
Unit-testing is managed with pytest.