feat: improve fallback handling in CoSTEER and add GPU usage guidelin… (#1165)

* feat: improve fallback handling in CoSTEER and add GPU usage guideline in share.yaml

* update prompt

* update
This commit is contained in:
Xu Yang
2025-08-07 15:52:55 +08:00
committed by GitHub
parent bad433ac47
commit 2764da68a3
2 changed files with 7 additions and 7 deletions
+6 -7
View File
@@ -133,17 +133,16 @@ class CoSTEER(Developer[Experiment]):
logger.info("Global timer is timeout, stop evolving")
break
# if the final feedback is not finished(therefore acceptable), we will use the fallback solution.
try:
evo_exp = self._exp_postprocess_by_feedback(evo_exp, self._get_last_fb())
except CoderError as e:
# Fallback is required because we might not choose the last acceptable evo to submit.
if fallback_evo_exp is not None:
logger.info("Fallback to the fallback solution.")
evo_exp = fallback_evo_exp
evo_exp.recover_ws_ckp() # NOTE: recovering checkpoints for restoring files in the workspace to prevent inplace mutation.
else:
e.caused_by_timeout = reached_max_seconds
raise e
evo_exp.recover_ws_ckp()
evo_exp = self._exp_postprocess_by_feedback(evo_exp, self._get_last_fb())
except CoderError as e:
e.caused_by_timeout = reached_max_seconds
raise e
exp.sub_workspace_list = evo_exp.sub_workspace_list
exp.experiment_workspace = evo_exp.experiment_workspace
@@ -352,6 +352,7 @@ component_spec:
- You can choose the most proper packages to achieve the task.
- When facing a choice between two packages which both can achieve the same goal, you should choose the one which is more commonly used and less likely to cause bugs in coding. Especially those you are not familiar with.
- For GBDT models, prefer XGBoost or RandomForest over LightGBM unless the SOTA or hypothesis dictates otherwise.
- To use GPU in training, always implement a check to ensure that the GPU is available and use it if possible. Fallback to CPU if GPU is not available. Especially in GBDT models, you might get error when you call `fit` method without checking the GPU availability. Add a try except block to handle this case.
- For neural networks, prefer PyTorch or PyTorch based library (over TensorFlow) unless the SOTA or hypothesis dictates otherwise.
- For neural networks, prefer fine-tuning pre-trained models over training from scratch.