sasha HF Staff commited on
Commit
d597ff2
·
verified ·
1 Parent(s): 4ee99d6

Update failed_run.py

Browse files
Files changed (1) hide show
  1. failed_run.py +3 -3
failed_run.py CHANGED
@@ -29,9 +29,9 @@ args = parser.parse_args()
29
  # Updating request
30
  dataset = load_dataset("EnergyStarAI/requests_debug", split="test", token=TOKEN).to_pandas()
31
 
32
- def upload_results():
33
  models_ran=[]
34
- for f in os.scandir('./runs'):
35
  if f.is_dir():
36
  for s in os.scandir(f):
37
  if s.is_dir() and s.name not in ['hooks','info','objects','refs','logs']:
@@ -52,7 +52,7 @@ try:
52
  print("Status set to FAILED")
53
  else:
54
  dataset.loc[dataset["model"].isin([args.model_name]), ['status']] = "COMPLETED"
55
- upload_results()
56
  dataset.loc[dataset["model"].isin(models_ran), ['status']] = "COMPLETED"
57
  print("Status set to COMPLETE")
58
  # Add a new column for the error message if necessary
 
29
  # Updating request
30
  dataset = load_dataset("EnergyStarAI/requests_debug", split="test", token=TOKEN).to_pandas()
31
 
32
+ def upload_results(output_dir):
33
  models_ran=[]
34
+ for f in os.scandir(output_dir):
35
  if f.is_dir():
36
  for s in os.scandir(f):
37
  if s.is_dir() and s.name not in ['hooks','info','objects','refs','logs']:
 
52
  print("Status set to FAILED")
53
  else:
54
  dataset.loc[dataset["model"].isin([args.model_name]), ['status']] = "COMPLETED"
55
+ models_ran = upload_results('./runs')
56
  dataset.loc[dataset["model"].isin(models_ran), ['status']] = "COMPLETED"
57
  print("Status set to COMPLETE")
58
  # Add a new column for the error message if necessary