Skip to content

Commit 9394579

Browse files
committed
debugv3
1 parent 223ed60 commit 9394579

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

rdagent/scenarios/data_science/proposal/exp_gen/prompts_v2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ scenario_description: |-
147147
====== Time Limit ======
148148
Your code's execution is limited to {{ time_limit }}. After this time limit, your code will be terminated. However, remember that your primary objective is to achieve the best possible performance, and you're allowed to revise your code multiple times. So be bold — make full use of the entire time limit, and don’t be too conservative.
149149
During this period, you have full access to computational resources (CPUs and GPUs). Please take advantage of them: choose powerful models, use large batch sizes, and enable parallelism (e.g., large-scale data sampling or multi-GPU training) where applicable.
150-
If your code involves ensemble training, note that the total time allowed for ensemble runs is {{ ensemble_limit }}. Make sure to plan your ensemble strategy wisely within this limit.
150+
If your code involves ensemble training, note that the total time allowed for ensemble runs is {{ ensemble_limit }} seconds. Make sure to plan your ensemble strategy wisely within this limit.
151151
{% endif %}
152152
153153
hypothesis_gen:

rdagent/scenarios/data_science/proposal/exp_gen/proposal.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,15 +731,16 @@ def hypothesis_select_with_llm(self,
731731
# res_time = 12*3600 - time_use_current
732732
res_time = RD_Agent_TIMER_wrapper.timer.remain_time()
733733
total_time = RD_Agent_TIMER_wrapper.timer.all_duration
734-
use_time = total_time.seconds - res_time.seconds
735-
use_ratio = 100* use_time // total_time.seconds
734+
use_time = round(total_time.total_seconds(),2) - round(res_time.total_seconds(),2)
735+
use_ratio = 100* use_time / round(total_time.total_seconds(),2)
736+
use_ratio = round(use_ratio, 2)
736737

737738
ensemble_timeout = DS_RD_SETTING.ensemble_timeout
738739
hypothesis_candidates = str(json.dumps(hypothesis_candidates, indent=2))
739740

740741
sys_prompt = T(".prompts_v2:hypothesis_select.system").r(
741742
hypothesis_candidates = hypothesis_candidates,
742-
res_time = res_time.seconds,
743+
res_time = round(res_time.total_seconds(),2),
743744
ensemble_timeout = ensemble_timeout,
744745
use_ratio = use_ratio,
745746
hypothesis_output_format = T(".prompts_v2:output_format.hypothesis_select_format").r(hypothesis_candidates = hypothesis_candidates)

rdagent/scenarios/data_science/scen/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def get_competition_full_desc(self) -> str:
140140
metric_direction=self.metric_direction,
141141
raw_description=self.raw_description,
142142
use_raw_description=DS_RD_SETTING.use_raw_description,
143+
ensemble_limit = DS_RD_SETTING.ensemble_timeout,
143144
time_limit=None,
144145
eda_output=None,
145146
)
@@ -157,6 +158,7 @@ def get_scenario_all_desc(self, eda_output=None) -> str:
157158
raw_description=self.raw_description,
158159
use_raw_description=DS_RD_SETTING.use_raw_description,
159160
time_limit=f"{DS_RD_SETTING.full_timeout / 60 / 60 : .2f} hours",
161+
ensemble_limit = DS_RD_SETTING.ensemble_timeout,
160162
eda_output=eda_output,
161163
)
162164

rdagent/scenarios/data_science/scen/prompts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ scenario_description: |-
2323
{% if time_limit %}------The time limit to your code------
2424
You code running is limit to {{ time_limit }}, after this time limit, your code will be terminated. But remember your main target is to achieve the best performance and you have several times to modify your code. So please be bold to make the best use of all the time limit and don't be too conservative.
2525
During this time limit, you have all the resources available to you. Please fully leverage all the computational resources(CPUs and GPUs) to achieve the best performance like choose a powerful model, use a large batch size, enable data sampler with big parallel.
26+
If your code involves ensemble training, note that the total time allowed for ensemble runs is {{ ensemble_limit }} seconds. Make sure to plan your ensemble strategy wisely within this limit.
2627
{% endif %}
2728
{% if evaluation is not none %}------Evaluation------
2829
{{ evaluation }}

0 commit comments

Comments
 (0)