Skip to main content

Manage your machine learning experiments with trixi - modular, reproducible, high fashion

Project description

DOI PyPI version Build Status Documentation Status Downloads GitHub

Finally get some structure into your machine learning experiments. trixi (Training & Retrospective Insights eXperiment Infrastructure) is a tool that helps you configure, log and visualize your experiments in a reproducible fashion.

Contribute

We're always grateful for contributions, even small ones! We're PhD students and this is just a side project, so there will always be something to improve.

The best way is to create pull requests on Github. Fork the repository and work either directly on develop or create a feature branch, whichever you like best. Then go to "Pull requests" on our Github, select "New pull request" and "compare across forks". Select our develop as base and your work as head/compare.

We currently don't support the full Github workflow, because we have to mirror from our working repository to Github, but don't worry, we can export the pull requests and apply them so that your contribution will still appear on Github :)

Features

trixi consists of three parts:

  • Logging API
    Log whatever data you like in whatever way you like to whatever backend you like.

  • Experiment Infrastructure
    Standardize your experiment, let the framework do all the inconvenient stuff, and simply start, resume, change and finetune all your experiments.

  • Experiment Browser
    Compare, combine and visually inspect the results of your experiments.

An implementation diagram is given here.

Logging API

The Logging API provides a standardized way for logging results to different backends. The Logging API supports (among others):

  • Values
  • Text
  • Plots (Bar, Line, Scatter, Piechart, ...)
  • Images (Single, Grid)

And offers different Backends, e.g. :

And an experiment-logger for logging your experiments, which uses a file logger to automatically create a structured directory and allows storing of config, results, plots, dict, array, images, etc. That way your experiments will always have the same structure on disk.

Here are some examples:

visdom-logger
  • Files:
file-logger
  • Telegram:
telegram-logger

Experiment Infrastructure

The Experiment Infrastructure provides a unified way to configure, run, store and evaluate your results. It gives you an experiment interface, for which you can implement the training, validation and testing. Furthermore it automatically provides you with easy access to the Logging API and stores your config as well as the results for easy evaluation and reproduction. There is an abstract Experiment class and a PytorchExperiment with many convenience features.

exp-trainexp-test

For more info, visit the Documentation.

Experiment Browser

(We're currently remaking this from scratch, expect major improvements :))

The Experiment Browser offers a complete overview of experiments along with all config parameters and results. It also allows to combine and/or compare different experiments, giving you an interactive comparison highlighting differences in the configs and a detailed view of all images, plots, results and logs of each experiment, with live plots and more. trixi browser

Installation

Install trixi:

pip install trixi

Or to always get the newest version you can install trixi directly via git:

git clone https://github.com/MIC-DKFZ/trixi.git
cd trixi
pip install -e .

Documentation

The docs can be found here: trixi.rtfd.io

Or you can build your own docs using Sphinx.

Sphinx Setup

Install Sphinx (fixed to 1.7.0 for now because of issues with Readthedocs):
pip install sphinx==1.7.0

Generate HTML:
path/to/PROJECT/doc$ make html

index.html will be at:
path/to/PROJECT/doc/_build/html/index.html

Notes

  • Rerun make html each time existing modules are updated (this will automatically call sphinx-apidoc)
  • Do not forget indent or blank lines
  • Code with no classes or functions is not automatically captured using apidoc

Example Documentation

We use Google style docstrings:

def show_image(self, image, name, file_format=".png", **kwargs):
    """
    This function shows an image.

    Args:
        image(np.ndarray): image to be shown
        name(str): image title
    """

Examples

Examples can be found here for:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trixi-slim-0.1.2.2.tar.gz (126.0 kB view details)

Uploaded Source

Built Distribution

trixi_slim-0.1.2.2-py3-none-any.whl (157.0 kB view details)

Uploaded Python 3

File details

Details for the file trixi-slim-0.1.2.2.tar.gz.

File metadata

  • Download URL: trixi-slim-0.1.2.2.tar.gz
  • Upload date:
  • Size: 126.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for trixi-slim-0.1.2.2.tar.gz
Algorithm Hash digest
SHA256 c889c98ecf2b53beadb97a389e3a18f9098287e6705845faecd021b7c90dd968
MD5 af1e790ba5987079a5fb3df1323d1d5f
BLAKE2b-256 4fc941887a12830329fdb676b2f46e6c38b81726cdfbc330b64bfc094bb3ada2

See more details on using hashes here.

File details

Details for the file trixi_slim-0.1.2.2-py3-none-any.whl.

File metadata

  • Download URL: trixi_slim-0.1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 157.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for trixi_slim-0.1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fc9cb3e03e5352f95119ae52356b6206543dac03153e4da5f18252bf75c61d9b
MD5 ac4d6dc3ac4bbc49fdfc90321e5fa09a
BLAKE2b-256 56d1490cb8fa25d0097623904b8b1d2211dd2a32515b0e8c8e96d774821ee5d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page