c-gohlke commited on
Commit
51cf3cb
·
verified ·
1 Parent(s): 890f078

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. src/huggingface/get_files.py +2 -2
src/huggingface/get_files.py CHANGED
@@ -23,7 +23,7 @@ def get_best(env: str, filename: str = "demo.mp4") -> Path:
23
  filename=hf_env_results_path,
24
  )
25
  with Path(local_env_results_path).open() as f:
26
- env_results = yaml.load(f, Loader=yaml.FullLoader)
27
  best_model_type = max(env_results, key=lambda model: env_results[model])
28
  model_results_path = f"models/{env}/{best_model_type}/results.yaml"
29
  local_model_results_path = hf_hub_download(
@@ -32,7 +32,7 @@ def get_best(env: str, filename: str = "demo.mp4") -> Path:
32
  filename=model_results_path,
33
  )
34
  with Path(local_model_results_path).open() as f:
35
- model_results = yaml.load(f, Loader=yaml.FullLoader)
36
 
37
  best_model = max(model_results, key=lambda model: model_results[model])
38
  hf_gif_path = f"models/{env}/{best_model_type}/{best_model}/{filename}"
 
23
  filename=hf_env_results_path,
24
  )
25
  with Path(local_env_results_path).open() as f:
26
+ env_results = yaml.safe_load(f)
27
  best_model_type = max(env_results, key=lambda model: env_results[model])
28
  model_results_path = f"models/{env}/{best_model_type}/results.yaml"
29
  local_model_results_path = hf_hub_download(
 
32
  filename=model_results_path,
33
  )
34
  with Path(local_model_results_path).open() as f:
35
+ model_results = yaml.safe_load(f)
36
 
37
  best_model = max(model_results, key=lambda model: model_results[model])
38
  hf_gif_path = f"models/{env}/{best_model_type}/{best_model}/{filename}"