feat: enable drafting with knowledge#998
Conversation
rdagent/app/data_science/conf.py
Outdated
| coding_fail_reanalyze_threshold: int = 3 | ||
|
|
||
| debug_timeout: int = 600 | ||
| debug_timeout: int = 900 |
There was a problem hiding this comment.
Remember to change it back and change it with env.
| - Step 1: If submission format has issues, prioritize fixing them before proceeding. If the format is correct and it's the first valid submission ever (there has never been valid submissions in the past), set `"Replace Best Result": "yes"`. If the format is correct and this is not the first valid submission, proceed to Step 2. | ||
| - Step 2: If evaluation alignment issues are identified (validation approach does not follow competition requirements), address these methodological discrepancies immediately. | ||
| - Step 3: If new results significantly worse than SOTA, or repeated hyperparameter adjustments yield no improvement, it might be time to rethink or shift focus. | ||
| - Step 4: If the result is only slightly better than the SOTA, but the code modifications are extensive (e.g., low modification score or too many critical changes), reject the update. Prefer small-step improvements with minimal changes. Set `"Replace Best Result": "no"` and explain in `"Reasoning"` starting with `[Code Change Too Large]`. |
There was a problem hiding this comment.
Is this PR focus on drafting?
There was a problem hiding this comment.
If we want other changes can be evaluated alone, we can create a seperate PR.
|
|
||
|
|
||
| class DSDraftExpGen(ExpGen): | ||
| class CodingSketch(BaseModel): |
There was a problem hiding this comment.
We don't have to duplicate this. We can import it directly
|
|
||
|
|
||
| # TODO: merge the two version draft in the further | ||
| def draft_exp_in_pipeline(scen: Scenario, trace: DSTrace) -> None | DSDraftExpGenV2: |
There was a problem hiding this comment.
We can use router to implement this feature
747dee1 to
9329487
Compare
rdagent/core/conf.py
Outdated
| ) | ||
|
|
||
|
|
||
| print('debug') |
rdagent/core/utils.py
Outdated
|
|
||
| from filelock import FileLock | ||
| from fuzzywuzzy import fuzz # type: ignore[import-untyped] | ||
| #from fuzzywuzzy import fuzz # type: ignore[import-untyped] |
| @@ -0,0 +1 @@ | |||
| print('sss') No newline at end of file | |||
| @@ -0,0 +1,17 @@ | |||
|
|
|||
| from dev.feedback import DSExperiment2Feedback | |||
There was a problem hiding this comment.
We can have better folder structure.
Let's discussion this later
|
|
||
| return hypothesis_feedback | ||
|
|
||
| class DSDraftExperiment2Feedback(DSExperiment2Feedback): |
|
|
||
| user: |- | ||
| We are currently in a process of validating hypotheses to iteratively improve our models for Kaggle competitions. Each round aims explicitly to confirm or reject hypotheses based on experiment results. | ||
| We prioritize minimal, incremental code changes that lead to measurable improvements.** |
There was a problem hiding this comment.
Is this PR focus on drafting?
There was a problem hiding this comment.
design a module.
Include + self customized.
| self.trace = DSTrace(scen=scen) | ||
| self.summarizer = DSExperiment2Feedback(scen) | ||
|
|
||
| #self.summarizer = DSExperiment2Feedback(scen) |
There was a problem hiding this comment.
| #self.summarizer = DSExperiment2Feedback(scen) |
| # Drafting Stage | ||
| if draft_exp := draft_exp_in_decomposition(self.scen, trace): | ||
| return draft_exp | ||
| # if draft_exp := draft_exp_in_decomposition(self.scen, trace): |
There was a problem hiding this comment.
We can keep the orginal code and leave the TODO comments.
| ) -> DSExperiment: | ||
|
|
||
| pipeline = DS_RD_SETTING.coder_on_whole_pipeline | ||
| if not pipeline and (draft_exp := draft_exp_in_decomposition(self.scen, trace)): |
There was a problem hiding this comment.
Do not break original logic if not necessary
| return self.base_exp_gen.gen(trace) | ||
|
|
||
|
|
||
| class DraftRouterExpGenV2(ExpGen): |
There was a problem hiding this comment.
Why do we have already two version of router alreadY?
| @@ -0,0 +1,17 @@ | |||
|
|
|||
| from dev.feedback import DSExperiment2Feedback | |||
|
|
||
| user: |- | ||
| We are currently in a process of validating hypotheses to iteratively improve our models for Kaggle competitions. Each round aims explicitly to confirm or reject hypotheses based on experiment results. | ||
| We prioritize minimal, incremental code changes that lead to measurable improvements.** |
There was a problem hiding this comment.
design a module.
Include + self customized.
| **[DataPreprocess] → [EDA] → [FeatureEngineer] → [Model] → [Tuning] → [Ensemble]** | ||
|
|
||
| ### Resource Note | ||
| **You have access to a 40GB V100 GPU.** |
|
|
||
| ### Resource Note | ||
| **You have access to a 40GB V100 GPU.** | ||
| You are **not restricted to lightweight models**. You may use medium to large pretrained architectures (e.g., EfficientNet-B3/B5, ConvNeXt-Tiny, Swin-S) **if they fit within the training time budget**. |
|
|
||
| - During [Model] or [Tuning], always estimate and test the largest **batch size** that fits into available memory to **maximize throughput**. | ||
| - Use `nvidia-smi` or code-level profiling to find the optimal **batch size / num_workers**. | ||
| - If runtime is a constraint, assume a **budget of 1.5–2 hours total for training + inference** in the first version. |
|
|
||
|
|
||
|
|
||
| # knowledge: |
| ) | ||
| else: | ||
| return None | ||
| # TODO: merge the two version draft in the further |
There was a problem hiding this comment.
remove this. It has been in router.
| return self.base_exp_gen.gen(trace) | ||
|
|
||
|
|
||
| """ |
rdagent/app/data_science/conf.py
Outdated
| """Hypothesis generation class""" | ||
|
|
||
| summarizer: str = "rdagent.scenarios.data_science.dev.feedback.DSExperiment2Feedback" | ||
| summarizer_version: str = "exp_feedback" # exp_feedback or exp_feedback_draft |
There was a problem hiding this comment.
summarizer_init_kwargs: dict = {.....}
| self.trace = DSTrace(scen=scen) | ||
| self.summarizer = DSExperiment2Feedback(scen) | ||
|
|
||
| self.summarizer = import_class(PROP_SETTING.summarizer)(scen=scen, version=PROP_SETTING.summarizer_version) |
There was a problem hiding this comment.
self.summarizer = import_class(PROP_SETTING.summarizer)(scen=scen, **)
| from rdagent.utils.agent.tpl import T | ||
|
|
||
|
|
||
| class CodingSketch(BaseModel): |
* add pipeline for drafting v2 * fix the pipeline and add general knowledge * debug * fix bug * fix bug * change draft version1 * add function calling to task gen * fix circular import bug * change draft version3 * exp1_test * feat: add DraftRouterExpGen and make summarizer configurable * Update rdagent/scenarios/data_science/proposal/exp_gen/proposal.py * change code structure * stashed changes * test * test1 * revert conf.py * add runtime enviornment info to general knowledge * remove redundant code * clean code * remove files * reformat * fix bug * fix bug * simplify code * fix minor bug * fix bug and reformat * revert config * remove unused prompt * add general knowledge * fix ci --------- Co-authored-by: Xu <v-xuminrui@microsoft.com> Co-authored-by: jingyuanlm <842442862@qq.com> Co-authored-by: Young <afe.young@gmail.com> Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
Description
Motivation and Context
How Has This Been Tested?
Screenshots of Test Results (if appropriate):
Types of changes
📚 Documentation preview 📚: https://RDAgent--998.org.readthedocs.build/en/998/