Skip to content

docs: fix critical doc-code mismatches across config, endpoints, LoRA, and metrics#1203

Closed
guozhihao-224 wants to merge 1 commit into
areal-project:mainfrom
guozhihao-224:docs/fix-critical-doc-code-mismatches
Closed

docs: fix critical doc-code mismatches across config, endpoints, LoRA, and metrics#1203
guozhihao-224 wants to merge 1 commit into
areal-project:mainfrom
guozhihao-224:docs/fix-critical-doc-code-mismatches

Conversation

@guozhihao-224

Copy link
Copy Markdown
Collaborator

Summary

Fix high-priority documentation issues that can directly cause user errors (runtime ValueError, 404s, or missing files), identified by automated audit in #1165.

Verification

Each fix was verified against the actual code:

  • Proxy endpoints: confirmed via server.py constants and OpenAI SDK URL construction behavior
  • group_size: confirmed InferenceEngineConfig has no such field; all examples use actor.adv_norm.group_size
  • Trajectory path: confirmed via StatsLogger.get_log_path() at stats_logger.py:179
  • LoRA: confirmed MegatronEngine supports LoRA via megatron-bridge at megatron_engine.py:284
  • SwanLab: confirmed valid modes are cloud/local/offline/disabled at cli_args.py:2078
  • Trackio: confirmed full integration in stats_logger.py:97-107

Test plan

  • pre-commit run --all-files passes
  • ./docs/build_all.sh builds without errors
  • CLI reference auto-generation reflects updated use_lora help string

Ref: #1165

🤖 Generated with Claude Code

…, and metrics

Fix high-priority documentation issues that can directly cause user errors:

1. **Proxy endpoints** (agent_workflow.md): Fix paths from /v1/chat/completions
   and /v1/responses to /chat/completions and /responses. The OpenAI SDK puts
   /v1/ in the base_url, not in the request path.

2. **Rollout config** (rollout_workflow.md): Remove non-existent
   rollout.group_size YAML config (group_size is a runtime API parameter).
   Fix trajectory dump path to include /logs/{user}/ segment.

3. **LoRA support** (cli_reference.md, lora.md, cli_args.py): Update "Only
   support FSDP" to include Megatron (requires megatron-bridge). Add note
   that SGLang LoRA requires weight_update_mode: disk.

4. **Metrics tracking** (metrics_tracking.md): Fix SwanLab mode from "online"
   (invalid) to "cloud". Add Trackio as a supported logging backend.

Ref: areal-project#1165 (Findings areal-project#3, areal-project#4, areal-project#5, areal-project#8, areal-project#9, areal-project#14, areal-project#15)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation and CLI help text to include support for LoRA with the Megatron backend, requiring the megatron-bridge package, and specifies that SGLang LoRA requires the disk weight update mode. Additionally, it introduces trackio as a new metrics tracking backend, updates API endpoint paths in the agent workflow documentation by removing the /v1 prefix, and modifies the trajectory storage path to include user-specific directories. I have no feedback to provide.

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.

1 participant