Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,10 @@ data_processor:
#### new part about data active iterator
dj_process_desc: 'Please compute difficulty scores for these math questions.'
agent_model_name: 'qwen-max'
agent_model_config:
config_name: 'my-qwen-instruction'
model_type: 'dashscope_chat'
model_name: 'qwen2.5-72b-instruct'
clean_strategy: 'iterative'
```

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.
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.

#### Familiar with Data-Juicer
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:
Expand Down
4 changes: 0 additions & 4 deletions examples/grpo_gsm8k_task_pipeline/gsm8k.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ data_processor:
# data active iterator related
dj_process_desc: 'Please compute difficulty scores for these math questions.'
agent_model_name: 'qwen-max'
agent_model_config:
config_name: 'my-qwen-instruction'
model_type: 'dashscope_chat'
model_name: 'qwen2.5-72b-instruct'
clean_strategy: 'iterative'

model:
Expand Down
10 changes: 0 additions & 10 deletions tests/data/controllers/task_parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import unittest

import agentscope
from agentscope.models import DashScopeChatWrapper
from loguru import logger

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

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

agentscope.init(
model_configs=[
{
"config_name": "my-qwen-instruction",
"model_type": "dashscope_chat",
"model_name": "qwen2.5-72b-instruct",
},
],
)
self.agent = DashScopeChatWrapper(
config_name="_",
model_name="qwen-max",
Expand Down
1 change: 0 additions & 1 deletion trinity/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class DataPipelineConfig:
str
] = None # Describe the data processing procedure without requiring users to be aware of the specific DJ parameters
agent_model_name: Optional[str] = None
agent_model_config: Optional[Dict[str, Any]] = None
clean_strategy: str = "iterative"
min_size_ratio: Optional[float] = None
min_priority_score: Optional[float] = 0.0
Expand Down
4 changes: 1 addition & 3 deletions trinity/data/controllers/active_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ def __init__(
self.pipeline_type = DataProcessorPipelineType(pipeline_type)

# check if the llm agent is required
if self.config.agent_model_name is not None and self.config.agent_model_config is not None:
if self.config.agent_model_name is not None:
# get the api key
api_key = os.environ.get("OPENAI_API_KEY")
# initialize the agent
import agentscope
from agentscope.models import DashScopeChatWrapper

agentscope.init(model_configs=[self.config.agent_model_config])
self.llm_agent = DashScopeChatWrapper(
config_name="_",
model_name=self.config.agent_model_name,
Expand Down