Log the command that started the run with all flags in experiment details

Currently, in the Details section, I can see what the entrypoint was, but it doesn’t tell me what the exact command was, with all the commandline arguments. This makes it difficult to re-create a run.

For example:

python run.py --lr 0.01 --layers 3

Hey @tmk,

Thanks for the question. I recommend that you pass command line arguments to the parameters, like this:

import argparse
import neptune

parser = argparse.ArgumentParser(description='Simple example')
parser.add_argument('--lr', type=float, help='learning rate')
parser.add_argument('--layers', type=int, help='number of hidden layers')

# parse arguments
args = parser.parse_args()

# prepare dict-like view of the attributes
params = vars(args)

# create neptune experiment with params

# here you pass params dictionary to the experiment

neptune.log_text('note', 'Look at Parameters tab')

Here is a link to example experiment with parameters logged: https://ui.neptune.ai/o/shared/org/showroom/e/SHOW-1990/parameters