mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-04 18:57:44 +00:00
feat: dump model (#776)
* feat: add model dump flag and multi-evaluator support * tmp code * refactor: update evaluator feedback and FBWorkspace types * feat: add get_clear_ws_cmd and CPU count in Docker environment * feat: Add model dump check level and enhance evaluator functionality fix data type bug * fix: Ensure required files exist before model dump evaluation * refactor: streamline prompt and file checks in model dump evaluation * fix: add assertions and reorder file reads in model dump evaluator * feat: remove EDA part from evaluation output * docs: update dump_model guidelines and eval prompt to include template * style: reformat multiline dicts and lists in conf and eval files * fix: add DOTALL flag to EDA removal regex
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from typing import Literal
|
||||
|
||||
from rdagent.app.data_science.conf import DS_RD_SETTING
|
||||
from rdagent.components.coder.CoSTEER.config import CoSTEERSettings
|
||||
from rdagent.utils.env import (
|
||||
CondaConf,
|
||||
@@ -48,3 +49,15 @@ def get_ds_env(conf_type: Literal["kaggle", "mlebench"] = "kaggle") -> Env:
|
||||
else:
|
||||
raise ValueError(f"Unknown env type: {conf.env_type}")
|
||||
return env
|
||||
|
||||
|
||||
def get_clear_ws_cmd(stage: Literal["before_training", "before_inference"] = "before_training") -> str:
|
||||
"""
|
||||
Clean the files in workspace to a specific stage
|
||||
"""
|
||||
assert stage in ["before_training", "before_inference"], f"Unknown stage: {stage}"
|
||||
if DS_RD_SETTING.enable_model_dump and stage == "before_training":
|
||||
cmd = "rm -r submission.csv scores.csv models"
|
||||
else:
|
||||
cmd = "rm submission.csv scores.csv"
|
||||
return cmd
|
||||
|
||||
Reference in New Issue
Block a user