Skip to content

feat: make spec optional#719

Merged
XianBW merged 5 commits intomainfrom
spec_refine
Mar 27, 2025
Merged

feat: make spec optional#719
XianBW merged 5 commits intomainfrom
spec_refine

Conversation

@XianBW
Copy link
Collaborator

@XianBW XianBW commented Mar 25, 2025

Description

Motivation and Context

How Has This Been Tested?

  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

📚 Documentation preview 📚: https://RDAgent--719.org.readthedocs.build/en/719/


#### enable specification
spec_enabled: bool = True
# - [ ] rdagent/components/coder/data_science/raw_data_loader/__init__.py: make spec implementation optional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this now

out_spec=PythonAgentOut.get_spec(),
)

if DS_RD_SETTING.spec_enabled:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we create a function like get_code_spec ?

code_spec = workspace.file_dict["spec/ensemble.md"]
else:
test_code = (
Environment(undefined=StrictUndefined)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use T here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T cannot render ".txt" file now.

if DS_RD_SETTING.spec_enabled
else T("scenarios.data_science.share:component_spec.general").r(
spec=T("scenarios.data_science.share:component_spec.Model").r(),
test_code=(DIRNAME / "eval_tests" / "model_test.txt").read_text().replace("model01", target_task.name),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use jinjia to render?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use jinjia needs more codes

@@ -1,3 +1,6 @@
"""
Tests for `model_workflow` in model01.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use jinja here?

if component_info:
if DS_RD_SETTING.spec_enabled:
task_spec = sota_exp.experiment_workspace.file_dict[component_info["spec_file"]]
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use test here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is not for generating codes, just for generating task/component

@XianBW XianBW merged commit a16b70f into main Mar 27, 2025
8 checks passed
@XianBW XianBW deleted the spec_refine branch March 27, 2025 09:17
Jensen246 pushed a commit to Jensen246/RD-Agent that referenced this pull request Jun 6, 2025
* feat: Add spec_enabled configuration for data science settings

* make spec alternative

* change spec logic in exp_gen

* remove some general texts

* align

---------

Co-authored-by: Young <afe.young@gmail.com>
Co-authored-by: yuanteli <1957922024@qq.com>
licong01-cloud pushed a commit to licong01-cloud/RD-Agent that referenced this pull request Dec 13, 2025
* feat: Add spec_enabled configuration for data science settings

* make spec alternative

* change spec logic in exp_gen

* remove some general texts

* align

---------

Co-authored-by: Young <afe.young@gmail.com>
Co-authored-by: yuanteli <1957922024@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants