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)
These examples are based on the legacy Neptune.ai API. You can find new API-based examples here.
- Neptune API Tour code | notebook |
- Tour with TensorFlow and Keras code | notebook |
- Tour with PyTorch code | notebook |
- Tour with Scikit-learn code | notebook |
- PyTorch code notebook
- Tensorflow / Keras code notebook
- PyTorch Lightning
- XGBoost code notebook
- lightGBM code notebook
- Optuna code notebook
- Scikit-learn code notebook
- Scikit Optimize code notebook
- Keras Tuner code notebook
- TensorBoard code notebook
- MLflow code notebook
- R code notebook
- Google Colab notebook
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
Each cell should be tagged with one or many of the following tags:
comment
tests
header
code
installation
library_updates
neptune_stop
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_fixed_libs.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
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',
]
- 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).