You can use
NeptuneHandler to track logs from the Python
Logger reference in the Python documentation
A handler that sends the records created by the logger to Neptune.
Logs will be stored as a
||An existing run reference, as returned by
||Log level of the logs to be captured by the handler. Defaults to
||Path to the
Create a logger:
Create a Neptune run:
If Neptune can't find your project name or API token
As a best practice, you should save your Neptune API token and project name as environment variables:
You can, however, also pass them as arguments when initializing Neptune:
- API token: In the bottom-left corner, expand the user menu and select Get my API token.
- Project name: in the top-right menu: → Edit project details.
If you haven't registered, you can also log anonymously to a public project (make sure not to publish sensitive data through your code!):
Create a NeptuneHandler object to capture the logs: