fix: fix a bug in docker result extraction (#824)

* fix a bug in docker result extraction
This commit is contained in:
Yuante Li
2025-04-24 19:02:38 +08:00
committed by GitHub
parent f8af5c0682
commit 7f90e44798
2 changed files with 18 additions and 4 deletions
@@ -27,8 +27,15 @@ for experiment in experiments:
experiment_name = experiment
recorder = R.get_recorder(recorder_id=recorder_id, experiment_name=experiment)
end_time = recorder.info["end_time"]
if latest_recorder is None or end_time > latest_recorder.info["end_time"]:
latest_recorder = recorder
try:
# Check if the recorder has a valid end time
if end_time is not None:
if latest_recorder is None or end_time > latest_recorder.info["end_time"]:
latest_recorder = recorder
else:
print(f"Warning: Recorder {recorder_id} has no valid end time")
except Exception as e:
print(f"Error: {e}")
# Check if the latest recorder is found
if latest_recorder is None:
@@ -27,8 +27,15 @@ for experiment in experiments:
experiment_name = experiment
recorder = R.get_recorder(recorder_id=recorder_id, experiment_name=experiment)
end_time = recorder.info["end_time"]
if latest_recorder is None or end_time > latest_recorder.info["end_time"]:
latest_recorder = recorder
try:
# Check if the recorder has a valid end time
if end_time is not None:
if latest_recorder is None or end_time > latest_recorder.info["end_time"]:
latest_recorder = recorder
else:
print(f"Warning: Recorder {recorder_id} has no valid end time")
except Exception as e:
print(f"Error: {e}")
# Check if the latest recorder is found
if latest_recorder is None: