glenn-jocher commited on
Commit
64e6d19
1 Parent(s): fdbcc8f

hyperparameter evolution update (#566)

Browse files
Files changed (1) hide show
  1. utils/utils.py +2 -0
utils/utils.py CHANGED
@@ -841,6 +841,8 @@ def print_mutation(hyp, results, yaml_file='hyp_evolved.yaml', bucket=''):
841
  for i, k in enumerate(hyp.keys()):
842
  hyp[k] = float(x[0, i + 7])
843
  with open(yaml_file, 'w') as f:
 
 
844
  f.write('# Hyperparameter Evolution Results\n# Generations: %g\n# Metrics: ' % len(x) + c + '\n\n')
845
  yaml.dump(hyp, f, sort_keys=False)
846
 
 
841
  for i, k in enumerate(hyp.keys()):
842
  hyp[k] = float(x[0, i + 7])
843
  with open(yaml_file, 'w') as f:
844
+ results = x[0, :7]
845
+ c = '%10.4g' * len(results) % results # results (P, R, [email protected], [email protected]:0.95, val_losses x 3)
846
  f.write('# Hyperparameter Evolution Results\n# Generations: %g\n# Metrics: ' % len(x) + c + '\n\n')
847
  yaml.dump(hyp, f, sort_keys=False)
848