feat: refactor CoSTEER classes to use DSCoSTEER and update max seconds handling (#1156)

* feat: refactor CoSTEER classes to use DSCoSTEER and update max seconds handling

* remove useless line

* enable time_ratio_limit_to_enable_hyperparameter_tuning
This commit is contained in:
Xu Yang
2025-08-05 18:16:10 +08:00
committed by GitHub
parent 50916fa6c9
commit 0284b73596
13 changed files with 53 additions and 43 deletions
+1
View File
@@ -56,6 +56,7 @@ class RDAgentSettings(ExtendedBaseSettings):
# workspace conf
workspace_path: Path = Path.cwd() / "git_ignore_folder" / "RD-Agent_workspace"
workspace_ckp_size_limit: int = 0
workspace_ckp_white_list_names: list[str] | None = None
"""
the checkpoint for the workspace is a zip file.
0 (or any value <=0) means *no* size limit for files in workspace checkpoints
+4 -1
View File
@@ -318,7 +318,10 @@ class FBWorkspace(Workspace):
zf.writestr(zi, str(file_path.readlink()))
elif file_path.is_file():
size_limit = RD_AGENT_SETTINGS.workspace_ckp_size_limit
if size_limit <= 0 or file_path.stat().st_size <= size_limit:
if (
RD_AGENT_SETTINGS.workspace_ckp_white_list_names is not None
and file_path.name in RD_AGENT_SETTINGS.workspace_ckp_white_list_names
) or (size_limit <= 0 or file_path.stat().st_size <= size_limit):
zf.write(file_path, file_path.relative_to(self.workspace_path))
self.ws_ckp = buf.getvalue()