meg HF Staff commited on
Commit
de74be2
·
verified ·
1 Parent(s): 461665c

See last commit -- fixing on another line.

Browse files
Files changed (1) hide show
  1. failed_run.py +2 -1
failed_run.py CHANGED
@@ -32,6 +32,7 @@ dataset = load_dataset("EnergyStarAI/requests_debug", split="test", token=TOKEN)
32
  # Set benchmark to failed
33
  dataset.loc[dataset["model"].isin([args.model_name]), ['status']] = "FAILED"
34
 
 
35
  try:
36
  # Read error message
37
  with open(f"{args.run_dir}/error.log", 'r') as file:
@@ -39,7 +40,7 @@ try:
39
  # Add a new column for the error message if necessary
40
  if "error_message" not in dataset.columns:
41
  dataset["error_message"] = ""
42
- dataset.loc[dataset["model"].isin(args.model_name), ['error_message']] = error_message
43
  except FileNotFoundError as e:
44
  print(f"Could not find {args.run_dir}/error.log")
45
 
 
32
  # Set benchmark to failed
33
  dataset.loc[dataset["model"].isin([args.model_name]), ['status']] = "FAILED"
34
 
35
+ # TODO: This doesn't have to be try-except, we could actually check if the file is there.
36
  try:
37
  # Read error message
38
  with open(f"{args.run_dir}/error.log", 'r') as file:
 
40
  # Add a new column for the error message if necessary
41
  if "error_message" not in dataset.columns:
42
  dataset["error_message"] = ""
43
+ dataset.loc[dataset["model"].isin([args.model_name]), ['error_message']] = error_message
44
  except FileNotFoundError as e:
45
  print(f"Could not find {args.run_dir}/error.log")
46