eml.config

This package allows users to save metadata associated with a run.

write

Often when viewing runs from the command line with engine list, you'll want a high level overview of the differences between runs. By passing in a dictionary to eml.config.write(), you can view hyperparameters and any other useful information across all your runs from the command line.

args = {
'model': 'resnet50',
'optimizer': 'adam'
}
eml.config.write(args)
eml.config.write({'learning_rate': 1e-4})
$ engine list -n 1
┌─────────────────────┬─────────────────────────────────┬───────────────────────────┬────────────────┬────────────────┐
│ Run │ Run Info │ Configuration │ Scalars │ Commit Message │
├─────────────────────┼─────────────────────────────────┼───────────────────────────┼────────────────┼────────────────┤
│ ID: outer-converter │ Status: Running │ GPUs: 2x K80 │ step: 12224 │ Engine ML Test │
│ Commit: af1464 │ Created: 10 minutes ago │ model: resnet50 │ acc: 0.611678 │ 2 GPUs │
│ Branch: demo │ Training: 3 minutes, 34 seconds │ optimizer: adam │ loss: 0.156536 │ │
│ │ │ learning_rate: 1e-4 │ │ │
│ │ │ optimizer: adam_optimizer │ │ │
└─────────────────────┴─────────────────────────────────┴───────────────────────────┴────────────────┴────────────────┘

write_from_args

Often when viewing runs from the command line with engine list, you'll want a high level overview of the differences between runs. By passing in arguments generated from argparse to eml.config.write_from_args(), you can view hyperparameters and any other useful information across all your runs from the command line.

import argparse
parser = argparse.ArgumentParser(description='TensorFlow MNIST Example')
parser.add_argument('--batch-size', type=int, default=64, metavar='N_SAMPLES',
help='input batch size for training (default: 64)')
parser.add_argument('--epochs', type=int, default=2, metavar='N_EPOCHS',
help='number of epochs to train (default: 2)')
parser.add_argument('--data-dir', type=str, default='/engine/data', metavar='DATA_DIR',
help='path to data directory')
parser.add_argument('--test-replica-weights', action='store_true',
help='test that weights are identical across all GPU devices')
parser.add_argument('--run-on-subset', action='store_true',
help='run on a subset of the data')
args = parser.parse_args()
eml.config.write_from_args(args)
$ engine list -n 1
┌──────────────────┬─────────────────────────────────┬─────────────────────────────┬────────────────┬────────────────┐
│ Run │ Run Details │ Configuration │ Scalars │ Commit Message │
├──────────────────┼─────────────────────────────────┼─────────────────────────────┼────────────────┼────────────────┤
│ ID: speedy-stick │ Status: Running │ GPUs: 2x K80 │ step: 12224 │ 2 GPUs │
│ Commit: dda525 │ Created: 10 minutes ago │ batch_size: 64 │ acc: 0.611678 │ │
│ Branch: demo │ Training: 3 minutes, 34 seconds │ data_dir: /engine/data │ loss: 0.156536 │ │
│ │ │ epochs: 2 │ │ │
│ │ │ run_on_subset: False │ │ │
│ │ │ test_replica_weights: False │ │ │
└──────────────────┴─────────────────────────────────┴─────────────────────────────┴────────────────┴────────────────┘