♻️ experiment.configs

This commit is contained in:
Varuna Jayasiri
2020-11-14 10:09:27 +05:30
parent ea976ab790
commit a331c99bdc
5 changed files with 5 additions and 11 deletions

View File

@ -153,8 +153,7 @@ def main():
conf = Configs()
experiment.create(name='mnist_latest')
experiment.configs(conf, {'optimizer.optimizer': 'Adam',
'device.cuda_device': 1},
'run')
'device.cuda_device': 1})
with experiment.start():
conf.run()

View File

@ -106,8 +106,7 @@ def main():
experiment.configs(conf,
{'discriminator': 'cnn',
'generator': 'cnn',
'label_smoothing': 0.01},
'run')
'label_smoothing': 0.01})
with experiment.start():
conf.run()

View File

@ -233,8 +233,7 @@ def main():
conf = Configs()
experiment.create(name='mnist_gan', comment='test')
experiment.configs(conf,
{'label_smoothing': 0.01},
'run')
{'label_smoothing': 0.01})
with experiment.start():
conf.run()

View File

@ -33,7 +33,7 @@ def load_experiment(run_uuid: str, checkpoint: Optional[int] = None):
# This experiment is just an evaluation; i.e. nothing is tracked or saved
experiment.evaluate()
# Initialize configurations
experiment.configs(conf, conf_dict, 'run')
experiment.configs(conf, conf_dict)
# Set models for saving/loading
experiment.add_pytorch_models(get_modules(conf))
# Specify the experiment to load from

View File

@ -331,10 +331,7 @@ def main():
'transformer.d_model': 256,
'transformer.d_ff': 1024,
'transformer.n_heads': 8,
'transformer.n_layers': 6},
# We need to load the function `TrainValidConfigs.run` and
# everything that it's dependent on
'run')
'transformer.n_layers': 6})
# Set models for saving and loading
experiment.add_pytorch_models(get_modules(conf))