fix(config): surface LoRA model import failures - #331
Conversation
|
Thanks for the audit pass. I'm closing this one, because the enclosing function is not reachable — the log level is a real inconsistency, but nothing can observe it.
Even if it were wired, it could not reach the branch this PR edits. It reads And the branch that would actually fire is a different one. No class in the tree implements One correction for the record: the appended "SGLang will wrap every linear layer" is only true on the diffusion path ( The genuinely useful finding here is the one underneath: the whole cross-component half of General note for the next batch: please confirm the trigger condition is reachable — name the config or the call chain that gets there — before filing. Four of the six PRs in this group turn out to change code that nothing can execute, and that check would have caught them upfront. |
Summary
When LoRA target modules are not configured explicitly, UniRL tries to import the configured model class so it can infer the correct linear-layer scope. If that import fails, the old code logged only at DEBUG level and returned with target modules still unset. SGLang then falls back to wrapping every linear layer, which can make rollout adapter coverage differ from the training configuration without an actionable signal.
This change promotes the diagnostic to WARNING and states the exact fallback behavior. The existing fallback remains non-raising so configurations that intentionally rely on downstream discovery keep their current control flow.
Related Issue
Fixes #327.
Test Plan
python -m compileall -q unirlgit diff --check abc05c1..HEADCompatibility / Risk
No API or configuration schema change. Import failures are now visible at WARNING level; the existing fallback behavior is unchanged.
Reviewer Notes
The important review point is the distinction between reporting the unresolved model class and changing the existing fallback contract. This PR only makes the silent failure visible.
Checklist