Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e1d7569514 | |||
| 9d096cab06 | |||
| a399fc1f93 | |||
| 0eac28434b | |||
| 0b470e9169 |
@@ -41,15 +41,19 @@ class VERL(Algorithm):
|
||||
```python
|
||||
config["agentlightning"]["trace_aggregator"] = {
|
||||
"level": "trajectory",
|
||||
"trajectory_max_prompt_length": ...,
|
||||
"trajectory_max_response_length": ...,
|
||||
"trajectory_max_prompt_length": 4096,
|
||||
"trajectory_max_response_length": 34384,
|
||||
}
|
||||
```
|
||||
|
||||
Keep conversations structured (message lists rather than manual string
|
||||
concatenation) so prefix matching can stitch traces, and toggle `debug=True` plus
|
||||
`unmatch_log_dir` when you need to inspect retokenization or chat-template
|
||||
mismatches. See [this blog post](https://agent-lightning.github.io/posts/trajectory_level_aggregation/)
|
||||
concatenation) so prefix matching can stitch traces. `trajectory_max_prompt_length`
|
||||
should be set to the maximum length of the prompt for the first turn, and
|
||||
`trajectory_max_response_length` should be set to the maximum cumulative
|
||||
length of agent responses in the full trajectory.
|
||||
Toggle `debug=True` plus `mismatch_log_dir` when you need to inspect
|
||||
retokenization or chat-template mismatches. See
|
||||
[this blog post](https://agent-lightning.github.io/posts/trajectory_level_aggregation/)
|
||||
for more details.
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -13,7 +13,7 @@ agentlightning:
|
||||
trajectory_max_prompt_length: 2048 # supported in trajectory level aggregation, suggest to set as maximum length for the prompt in first turn
|
||||
trajectory_max_response_length: 8192 # supported in trajectory level aggregation, suggest to set as maximum length for the cumulative agent responses in the full trajectory, i.e., n_turns * (max_response_length + max_prompt_length)
|
||||
debug: False # supported in trajectory level aggregation, enable to diagnose trace merging failures
|
||||
unmatch_log_dir: ./unmatch_cases # supported in trajectory level aggregation with debug=True, directory to store logs of unmatched cases
|
||||
mismatch_log_dir: ./mismatch_cases # supported in trajectory level aggregation with debug=True, directory to store logs of mismatch cases
|
||||
|
||||
data:
|
||||
filter_overlong_prompts: false
|
||||
|
||||
@@ -945,7 +945,7 @@ class AgentModeDaemon:
|
||||
global_steps,
|
||||
rollout_id,
|
||||
turn_index,
|
||||
self.trace_aggregator.get("unmatch_log_dir", None),
|
||||
self.trace_aggregator.get("mismatch_log_dir", None),
|
||||
)
|
||||
|
||||
if is_prefix:
|
||||
|
||||
+14
-9
@@ -328,19 +328,24 @@ include = [
|
||||
"agentlightning/**/*.yaml",
|
||||
"agentlightning/**/*.yml",
|
||||
"agentlightning/**/*.poml",
|
||||
"agentlightning/**/*.html",
|
||||
"agentlightning/**/*.js",
|
||||
"agentlightning/**/*.css",
|
||||
"agentlightning/**/*.svg",
|
||||
]
|
||||
artifacts = [
|
||||
"agentlightning/dashboard/**",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
exclude = [
|
||||
"examples/**",
|
||||
"tests/**",
|
||||
"docs/**",
|
||||
"scripts/**",
|
||||
"dashboard/**",
|
||||
"/examples/**",
|
||||
"/tests/**",
|
||||
"/docs/**",
|
||||
"/scripts/**",
|
||||
"/dashboard/**",
|
||||
"/docker/**",
|
||||
"/contrib/**",
|
||||
"/.github/**",
|
||||
]
|
||||
artifacts = [
|
||||
"agentlightning/dashboard/**",
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
|
||||
Reference in New Issue
Block a user