Sacred is a tool to configure, organize, log, and reproduce computational experiments. It is designed to introduce only minimal overhead, while encouraging modularity and configurability of experiments.
With Neptune + Sacred integration the following metadata will be logged automatically for you:
Losses & metrics
Training code(Python scripts or Jupyter notebooks) and git information
You need to have
Python 3.6+ and install the following libraries installed:
To install them just go to you console and run:
pip install neptune-client[sacred] sacred torch torchvision
Place this code snippet at the beginning of your script or notebook cell
import neptune.new as neptunerun = neptune.init(project = '<YOUR_WORKSPACE/YOUR_PROJECT>',api_token = '<YOURR_API_TOKEN>')
This opens a new Run in Neptune that allows you to log various objects.
# Create sacred experimentex = Experiment('image_classification', interactive=True)# Add NeptuneObserverex.observers.append(NeptuneObserver(run=neptune_run))
Using NeptuneObsever the following is automatically logged to Neptune UI for you:
After running your script or notebook cell you will get a link similar to:
common/sacred-integration replaced by your project, and
SAC-11 replaced by your run.
Click on the link to open the Run in Neptune to watch your model training live.
Initially, it may be empty but keep the tab with the Run open to see your experiment metadata update in real-time.
sacred.Experiment.add_artifact() is called with a filename and optionally a name this will trigger an event in the Neptune0bserver to upload the file to Neptune.
Please visit the Getting help page. Everything regarding support is there