mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-09 13:00:56 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user