Skip to content

Commit 1b6d103

Browse files
committed
v2
1 parent 64d57d0 commit 1b6d103

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,14 @@ hypothesis_rewrite:
365365
366366
- Runtime Assessment
367367
The current maximum runtime of the code is {time_max} hours.
368-
Please assess whether this is a time-intensive competition—specifically, if the runtime of a single hypothesis falls within 50% to 90% of the total allowed time {full_time} hours.
369-
In such cases, you must remove any hypotheses that are likely to exceed the time limit, especially those involving ensemble models or an excessive number of cross-validation folds.
370-
If the competition is not time-intensive, ensure that the expected runtime of each retained hypothesis does not exceed 1.5 × {time max} hours, unless you have strong confidence that the hypothesis—despite its high computational cost—will lead to significantly better performance or results.
368+
Please assess whether this is a time-intensive competition—specifically, if the runtime of a single hypothesis falls within 50% to 100% of the total allowed time {full_time} hours. In such cases, you must remove any hypotheses that are likely to exceed the time limit, especially those involving ensemble models or an excessive number of cross-validation folds.
371369
372-
- Retention Condition
373-
If the above conditions are met, you do not need to delete any hypotheses.
370+
- Retention Condition
371+
If the competition is not time-intensive, ensure that the expected runtime of each retained hypothesis does not exceed 1.5 × {time_max} hours, unless you have strong confidence that the hypothesis—despite its high computational cost—will lead to significantly better performance or results. You can consider keeping this hypotheses.
372+
373+
- Critical Challenge Addressing
374+
If a hypothesis addresses a critical challenge that has caused prior experiment failures, it should be removed.
375+
374376
375377
{% if rewrite_output_format is not none %}
376378
## Output Format

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ def hypothesis_rewrite(
731731
scenario_desc: str,
732732
sota_exp_desc: str,
733733
exp_feedback_list_desc: str,
734+
trace: DSTrace,
734735
) -> Dict:
735736
"""
736737
Generate improved hypotheses based on critique feedback for each original hypothesis.
@@ -746,10 +747,11 @@ def hypothesis_rewrite(
746747
hypothesis_critique_pairs += f"**Component:** {hypothesis_data.get('component', 'Unknown')}\n"
747748
hypothesis_critique_pairs += f"**Reasoning:** {hypothesis_data.get('reason', 'Not provided')}\n"
748749
hypothesis_critique_pairs += f"**Critique:** {critique_data.get('critique', 'No critique available')}\n\n"
749-
750+
751+
time_list = [tr[0].running_info.running_time for tr in trace.hist[:-1]]
750752
time_status = None
751-
time_max = 2*3600#trace.hist.runing_info.get("time_max", None)
752-
full_time = DS_RD_SETTING.full_timeout
753+
time_max = max(time_list)/ 3600 #2*3600
754+
full_time = DS_RD_SETTING.full_timeout / 3600
753755

754756
if DS_RD_SETTING.enable_scale_check and RD_Agent_TIMER_wrapper.timer.started:
755757
remain_time = RD_Agent_TIMER_wrapper.timer.remain_time()
@@ -1141,6 +1143,7 @@ def gen(
11411143
scenario_desc=scenario_desc,
11421144
sota_exp_desc=sota_exp_desc,
11431145
exp_feedback_list_desc=exp_feedback_list_desc,
1146+
trace = trace
11441147
)
11451148
logger.info(f"Successfully completed hypothesis critique and rewrite process")
11461149
except Exception as e:

0 commit comments

Comments
 (0)