Spaces:
Runtime error
Runtime error
Update failed_run.py
Browse files- 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(
|
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
|