Implement yaml.safe_load() (#2876)

* Implement yaml.safe_load()

* yaml.safe_dump()
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-04-21 14:34:45 +02:00
1 parent c949fc86d1
commit f7bc685c2c
10 files changed
+23 -22

No files matched your search

+1 -1
View File
@@ -323,7 +323,7 @@ def plot_labels(labels, names=(), save_dir=Path(''), loggers=None):
def plot_evolution(yaml_file='data/hyp.finetune.yaml'): # from utils.plots import *; plot_evolution()
# Plot hyperparameter evolution results in evolve.txt
with open(yaml_file) as f:
hyp = yaml.load(f, Loader=yaml.SafeLoader)
hyp = yaml.safe_load(f)
x = np.loadtxt('evolve.txt', ndmin=2)
f = fitness(x)
# weights = (f - f.min()) ** 2 # for weighted results