You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't reflect the latest API anymore: the experiment.log_metric1 signature has swapped xandy`.
When using multiprocessing for data loading (that's common practice with PyTorch's torch.utils.data.DataLoader), its problematic to execute expressions outside an if __name__ == '__main__' clause (at least on Windows): it starts multiple experiments...
I usually want to have my training script also be possible to launch from console. What do you think of the proposed snipped for merging both sets of arguments/options?
fromcollectionsimportChainMap
defmain():
# Training settingsparser=argparse.ArgumentParser(description='PyTorch MNIST Example',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--batch-size', type=int, default=64, metavar='N',
help='input batch size for training')
# More arguments...args=parser.parse_args()
experiment=deepkit.experiment()
# Merge CLI arguments (low priority) with experiment hyperparameters (high priority)args=argparse.Namespace(**ChainMap(experiment.full_config(), vars(args)))
# Update merged arguments back to experiment serverforkey, valinvars(args).items():
experiment.set_config(key, val)
# Capsule the experiment handle into `args` as well, so distribution to train() and test() methods is easyargs.experiment=experiment
The text was updated successfully, but these errors were encountered:
The PyTorch example could use some improvement:
experiment.log_metric1 signature has swapped
xand
y`.torch.utils.data.DataLoader
), its problematic to execute expressions outside anif __name__ == '__main__'
clause (at least on Windows): it starts multiple experiments...The text was updated successfully, but these errors were encountered: