Catalyst

You can use NeptuneLogger to capture model training metadata when using Catalyst.

You can find detailed information on how to install and use the integration in the user guide.

NeptuneLogger

Neptune logger for parameters, metrics, images and other artifacts (videos, audio, model checkpoints, etc.).

Parameters

base_namespace

(str, optional, default is "experiment") - Namespace under which all metadata logged by the NeptuneLogger will be stored.

api_token

(str, optional, default is None) – User’s API token. If None, the value of NEPTUNE_API_TOKEN environment variable will be taken.

Note: It is strongly recommended to use NEPTUNE_API_TOKEN environment variable rather than placing your API token in plain text in your source code.

project

(str, optional, default is None) – Name of a project in a form of namespace/project_name. If None, the value of NEPTUNE_PROJECT environment variable will be taken.

run

(Run) - An existing run reference (as returned by neptune.init()).

neptune_run_kwargs

Additional keyword arguments to be passed directly to the .init() function - if the run parameter is None NeptuneLogger will create a Run object for you.

Examples

# Add NeptuneLogger through .train() function
from catalyst import dl
runner = dl.SupervisedRunner()
runner.train(
...
loggers={
"neptune": dl.NeptuneLogger(
project="WORKSPACE/PROJECT",
tags=["pretraining", "retina"],
)
}
)
# Add NeptuneLogger from within custom runner implementation
from catalyst import dl
class CustomRunner(dl.IRunner):
# ...
def get_loggers(self):
return {
"console": dl.ConsoleLogger(),
"neptune": dl.NeptuneLogger(
project="WORKSPACE/PROJECT"
)
}
# ...
runner = CustomRunner().run()

You can also add NeptuneLogger through Config API and Hydra API:

# Config API
loggers:
neptune:
_target_: NeptuneLogger
project: WORKSPACE/PROJECT
...
# Hydra API
loggers:
neptune:
_target_: catalyst.dl.NeptuneLogger
project: WORKSPACE/PROJECT
base_namespace: catalyst
...