/neptune-examples

Examples of using Neptune to keep track of your experiments.

Primary LanguageJupyter Notebook

neptune-examples

Examples for using Neptune to keep track of your experiments.

You can run every example with zero setup as an "ANONYMOUS" Neptune user (no registration needed).

For each example you can:

  • see the script (code),
  • see rendered notebook (notebook)
  • or open the notebook in Colab (open in colab)

Quick Starts

Product Tours

Integrations

Contributing

Required sections~/

When you create an example notebook remember to create the following sections:

  • Installation: all the libraries needed to run this in Colab in their current versions
  • Library updates: all the libraries from the point before but with --upgrade at the end
  • Neptune stop: after each experiment you should stop the experiment

Tags

Each cell should be tagged with one or many of the following tags:

  • comment
  • tests
  • header
  • code
  • installation
  • library_updates
  • neptune_stop

Creating scripts, notebooks and tests

For each example notebook you create the following artifacts will be created automatically:

  • */docs/NOTEBOOK_NAME.ipynb : it excluded cells tagged with 'comment', 'tests', 'library_updates'
  • */docs/NOTEBOOK_NAME.py : it excluded cells tagged with'comment', 'tests', 'library_updates', 'neptune_stop'
  • */showcase/NOTEBOOK_NAME.ipynb : it excluded cells tagged with 'tests', 'library_updates'
  • */tests/NOTEBOOK_NAME.py : it excluded cells tagged with 'comment', 'library_updates' , 'neptune_stop'
  • */tests/NOTEBOOK_NAME_upgraded_libs.py : it excluded cells tagged with 'comment', 'neptune_stop'

To do it run:

python ci/build.py

To run all of those scripts execute:

python ci/run.py

Under the hood all the examples are run with ipython SCRIPT_NAME.py to run the library installations from within the script.

You can also run both with:

source run.sh

Configuration

You can configure which notebooks should be created or run with the config.yaml configuration file.

create_docs_paths

This is used in ci/create.py. Pass paths to all the notebook for which you want to create artifacts. For example:

create_docs_paths: [
  'integrations/pytorch-lightning/Neptune-PyTorch-Lightning-basic.ipynb',
  'quick-starts/monitor-ml-runs/Monitor-ML-runs-live.ipynb',
  'quick-starts/organize-ml-experimentation/Organize-ML-experiments.ipynb',
]

run_docs_paths

This is used in ci/run.py.

included_patterns

Pass patterns that you want to include. By default those are /docs, /tests and /showcase For example:

  included_patterns: [
    '/docs',
    '/tests',
    '/showcase',
  ]

included_patterns

Pass patterns that you want to exclude. By default those are /.ipynb_checkpoints, /.git and /showcase For example:

  excluded_patterns: [
    '/.ipynb_checkpoints',
    '/.git',
  ]

Notes

  • The following files are a temporary fix (leaving old paths for now):
    • logging_snippets.ipynb
    • Neptune-API-Tour.ipynb
    • Organize-ML-experiments.ipynb
    • r-integration.ipynb
    • Use-Neptune-API-to-log-your-first-experiment.ipynb
    • Monitor-ML-runs-live.ipynb
    • neptune_test_run.ipynb
    • pytorch_lightning-integration.ipynb
    • Template.ipynb
    • xgboost-integration.ipynb
  • XGBoost integration (upgraded libs case) is not tested on Win with Python 3.8, as it causes tkinter error.
  • "Neptune-API-Tour" (product-tours) is not tested on Windows, because unable to install Tensorflow on a Windows CI server (error msg).