Skip to content

Commit

Permalink
ds model fit for spec & workspace change
Browse files Browse the repository at this point in the history
  • Loading branch information
TPLin22 committed Dec 17, 2024
1 parent 2e2d153 commit 6926e18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rdagent/components/coder/CoSTEER/evolving_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def evolve(

result = multiprocessing_wrapper(
[
(self.implement_one_task, (evo.sub_tasks[target_index], queried_knowledge, evo.sub_workspace_list[target_index]))
(self.implement_one_task, (evo.sub_tasks[target_index], queried_knowledge, evo.experiment_workspace))
for target_index in to_be_finished_task_index
],
n=RD_AGENT_SETTINGS.multi_proc_n,
Expand Down
2 changes: 1 addition & 1 deletion rdagent/components/coder/data_science/model/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def evaluate(
system_prompt = T(".prompts:model_eval.system").r(
test_code=test_code,
scenario="No scenario information yet.",
spec=target_task.spec,
spec=implementation.code_dict["spec/model.md"]
)
user_prompt = T(".prompts:model_eval.user").r(
stdout=stdout,
Expand Down
4 changes: 1 addition & 3 deletions rdagent/components/coder/data_science/model/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def develop_one_competition(competition: str):
variables="variables: {'\\hat{y}_u': 'The predicted output for node u', 'X_u': 'The input features for node u'}",
hyperparameters="...",
base_code="",
spec="",
)

tpl_ex_path = Path(__file__).resolve() / Path("rdagent/scenarios/kaggle/tpl_ex").resolve() / competition
Expand All @@ -42,7 +41,6 @@ def develop_one_competition(competition: str):
file_path = tpl_ex_path / file_name
modelexp.inject_code(**{file_name: file_path.read_text()})

mt.spec += modelexp.code_dict["spec/model.md"]
mt.base_code += modelexp.code_dict["model01.py"]
exp = ModelExperiment(
sub_tasks=[mt],
Expand All @@ -55,7 +53,7 @@ def develop_one_competition(competition: str):

# Test the evolving strategy:
"""es = ModelMultiProcessEvolvingStrategy(scen=scen, settings=CoSTEER_SETTINGS)
new_code = es.implement_one_task(target_task=mt, queried_knowledge=None)
new_code = es.implement_one_task(target_task=mt, queried_knowledge=None, workspace=modelexp)
print(new_code)"""

# Run the experiment
Expand Down

0 comments on commit 6926e18

Please sign in to comment.