feat: add option to enable hyperparameter tuning only in first eval loop (#1211)

* feat: add option to enable hyperparameter tuning only in first eval loop

* fix: use total_seconds() for accurate time calculations in evolution and tracking
This commit is contained in:
you-n-g
2025-08-29 16:59:22 +08:00
committed by GitHub
parent 7735e121b4
commit 1b15b53c1a
4 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ class CoSTEER(Developer[Experiment]):
logger.log_object(evo_exp.sub_workspace_list, tag="evolving code")
for sw in evo_exp.sub_workspace_list:
logger.info(f"evolving workspace: {sw}")
if max_seconds is not None and (datetime.now() - start_datetime).seconds > max_seconds:
if max_seconds is not None and (datetime.now() - start_datetime).total_seconds() > max_seconds:
logger.info(f"Reached max time limit {max_seconds} seconds, stop evolving")
reached_max_seconds = True
break