Any language support¶
You can track experiments that you run in any language in Neptune by logging data to a JSON file and syncing that with Neptune.
Install packages¶
Install Python and pip package manager on your system.
Note
You need to have Python running on your system.
After that, simply install neptune-client and neptune-contrib.
pip install neptune-client neptune-contrib --user
Log your experiment data to a JSON file¶
You can log anything you want, as long as you can save it in the following format:
{
"name": "example",
"description": "json tracking experiment",
"params": {
"lr": 0.1,
"batch_size": 128,
"dropout": 0.5
},
"properties": {
"data_version": "1231ffwefef9",
"data_path": "data/train.csv"
},
"tags": [
"resnet",
"no_preprocessing"
],
"upload_source_files": [
"run.sh"
],
"log_metric": {
"log_loss": {
"x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
"y": [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
},
"accuracy": {
"x": [0, 4, 5, 8, 9],
"y": [0.23, 0.47, 0.62, 0.89, 0.92]
}
},
"log_text": {
"hash": {
"x": [0, 4, 5, 8, 9],
"y": ["123123", "as32e132", "123sdads", "123asdasd", " asd324132a"]
}
},
"log_image": {
"diagnostic_charts": {
"x": [0, 1, 2],
"y": ["data/roc_auc_curve.png", "data/confusion_matrix.png"
]
}
},
"log_artifact": ["data/model.pkl", "data/results.csv"]
}
Sync your JSON file with Neptune¶
Now you can convert your JSON file into a Neptune experiment by running:
python -m neptunecontrib.sync.with_json \
--api_token "ANONYMOUS" \
--project_name shared/any-language-integration \
--filepath experiment_data.json
Explore your experiment in Neptune¶
Now you can watch your metrics, parameters and logs in Neptune!
Check out this example experiment.
