Skip to content

docs: clarify backend field is required, no implicit inheritance#1204

Closed
guozhihao-224 wants to merge 1 commit into
areal-project:mainfrom
guozhihao-224:docs/fix-backend-inheritance
Closed

docs: clarify backend field is required, no implicit inheritance#1204
guozhihao-224 wants to merge 1 commit into
areal-project:mainfrom
guozhihao-224:docs/fix-backend-inheritance

Conversation

@guozhihao-224

Copy link
Copy Markdown
Collaborator

Summary

Clarify that critic.backend and ref.backend do not automatically inherit from actor.backend. The backend field has default=MISSING (required), and there is no code-level fallback. Users should use OmegaConf interpolation ${actor.backend} to share the actor backend.

The previous docs showed backend: "" and claimed it would "automatically inherit", which would actually cause a runtime error since MISSING requires an explicit value.

Verification

  • Confirmed TrainEngineConfig.backend has default=MISSING at cli_args.py:1131
  • All example YAMLs use explicit ${actor.backend} interpolation (e.g., gsm8k_ppo.yaml:85)
  • No __post_init__ or resolver implements fallback logic

Test plan

  • pre-commit run --all-files passes
  • ./docs/build_all.sh builds without errors

Ref: #1165 (Finding #1)

🤖 Generated with Claude Code

The `backend` field in `TrainEngineConfig` has `default=MISSING`, making it
required. The docs previously claimed that empty `critic.backend` or
`ref.backend` would "automatically inherit" from `actor.backend`, but there
is no code-level fallback. Clarify that users should use OmegaConf
interpolation (`${actor.backend}`) to share the actor backend.

Ref: areal-project#1165 (Finding areal-project#1)

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 in docs/en/reference/alloc_mode.md to specify that the backend field is now required for all engines, removing the implicit fallback behavior. It introduces the use of OmegaConf interpolation for sharing backend configurations between engines. 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