Skip to content

Commit 6eb2a44

Browse files
authored
Remove useless configs (#113)
1 parent 30d2818 commit 6eb2a44

File tree

5 files changed

+2
-23
lines changed

5 files changed

+2
-23
lines changed

docs/sphinx_doc/source/tutorial/example_data_functionalities.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,10 @@ data_processor:
8888
#### new part about data active iterator
8989
dj_process_desc: 'Please compute difficulty scores for these math questions.'
9090
agent_model_name: 'qwen-max'
91-
agent_model_config:
92-
config_name: 'my-qwen-instruction'
93-
model_type: 'dashscope_chat'
94-
model_name: 'qwen2.5-72b-instruct'
9591
clean_strategy: 'iterative'
9692
```
9793

98-
You can write your demand description in config item `dj_process_desc`, and set the model name and configs used for the agent in config items `agent_model_name` and `agent_model_config`. Here we use Qwen2.5-72b-Instruct as our recipe managing agent. And you can set the `clean_strategy` to 'iterative' to get a better dataset.
94+
You can write your demand description in config item `dj_process_desc`, and set the model name used for the agent in config items `agent_model_name`. Here we use Qwen-Max as our recipe managing agent. And you can set the `clean_strategy` to 'iterative' to get a better dataset.
9995

10096
#### Familiar with Data-Juicer
10197
If you are familiar with Data-Juicer, you will realize that Data-Juicer provides an operator that can calculate difficulty scores using existing LLMs. In this case, you can prepare your own Data-Juicer data processing recipe and equip this operator. For example:

examples/grpo_gsm8k_task_pipeline/gsm8k.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ data_processor:
2525
# data active iterator related
2626
dj_process_desc: 'Please compute difficulty scores for these math questions.'
2727
agent_model_name: 'qwen-max'
28-
agent_model_config:
29-
config_name: 'my-qwen-instruction'
30-
model_type: 'dashscope_chat'
31-
model_name: 'qwen2.5-72b-instruct'
3228
clean_strategy: 'iterative'
3329

3430
model:

tests/data/controllers/task_parser_test.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import unittest
55

6-
import agentscope
76
from agentscope.models import DashScopeChatWrapper
87
from loguru import logger
98

@@ -19,15 +18,6 @@ def setUp(self) -> None:
1918

2019
api_key = os.environ.get("OPENAI_API_KEY", None)
2120

22-
agentscope.init(
23-
model_configs=[
24-
{
25-
"config_name": "my-qwen-instruction",
26-
"model_type": "dashscope_chat",
27-
"model_name": "qwen2.5-72b-instruct",
28-
},
29-
],
30-
)
3121
self.agent = DashScopeChatWrapper(
3222
config_name="_",
3323
model_name="qwen-max",

trinity/common/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ class DataPipelineConfig:
137137
str
138138
] = None # Describe the data processing procedure without requiring users to be aware of the specific DJ parameters
139139
agent_model_name: Optional[str] = None
140-
agent_model_config: Optional[Dict[str, Any]] = None
141140
clean_strategy: str = "iterative"
142141
min_size_ratio: Optional[float] = None
143142
min_priority_score: Optional[float] = 0.0

trinity/data/controllers/active_iterator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ def __init__(
4646
self.pipeline_type = DataProcessorPipelineType(pipeline_type)
4747

4848
# check if the llm agent is required
49-
if self.config.agent_model_name is not None and self.config.agent_model_config is not None:
49+
if self.config.agent_model_name is not None:
5050
# get the api key
5151
api_key = os.environ.get("OPENAI_API_KEY")
5252
# initialize the agent
53-
import agentscope
5453
from agentscope.models import DashScopeChatWrapper
5554

56-
agentscope.init(model_configs=[self.config.agent_model_config])
5755
self.llm_agent = DashScopeChatWrapper(
5856
config_name="_",
5957
model_name=self.config.agent_model_name,

0 commit comments

Comments
 (0)