Installation

Standard

Pip

To install using pip, run the following within a suitable virtual environment:

pip install dingo-gw

This installs Dingo and its runtime dependencies, as specified in
pyproject.toml.

Optional functionality can be enabled via extras, for example:

pip install "dingo-gw[wandb,pyseobnr]"

Conda

Dingo is also available from the conda-forge repository. To install using conda, first activate a conda environment, and then run

conda install -c conda-forge dingo-gw

Development

Installation

If you would like to make changes to Dingo or contribute to its development, install it from source.

First clone the repository:

git clone git@github.com:dingo-gw/dingo.git
cd dingo-gw

Alternative (pip)

If you prefer pip, create and activate a virtual environment:

python3 -m venv dingo-venv
source dingo-venv/bin/activate

Install Dingo in editable mode with development tools:

pip install -e ".[dev]"

Optional user-facing features can be enabled via extras, for example:

pip install -e ".[dev,wandb]"

Documentation

To build the documentation, first generate the API documentation using autodoc:

cd docs
sphinx-apidoc -o source ../dingo

This will create dingo.*.rst and modules.rst files in source/. These correspond to the various modules and are constructed from docstrings.

To finally compile the documentation, run

make html

This creates a directory build/ containing HTML documentation. The main index is at build/html/index.html.

To use the autodoc feature, which works for pycharm and numpy docstrings, insert in a .rst file, e.g.,

.. autofunction:: dingo.core.utils.trainutils.write_history`

This will render as

dingo.core.utils.trainutils.write_history(log_dir, epoch, train_loss, test_loss, learning_rates, aux=None, filename='history.txt')

Writes losses and learning rate history to csv file.

Parameters:
  • log_dir (str) – directory containing the history file

  • epoch (int) – epoch

  • train_loss (float) – train_loss of epoch

  • test_loss (float) – test_loss of epoch

  • learning_rates (list) – list of learning rates in epoch

  • aux (list = []) – list of auxiliary information to be logged

  • filename (str = 'history.txt') – name of history file

Cleanup

To remove generated docs, execute

make clean
rm source/dingo.* source/modules.rst