fix(entry): pass the required logger to log_module_trainable_status / log_param_statistics - #503
Open
Anai-Guo wants to merge 1 commit into
Open
fix(entry): pass the required logger to log_module_trainable_status / log_param_statistics#503Anai-Guo wants to merge 1 commit into
Anai-Guo wants to merge 1 commit into
Conversation
… log_param_statistics CurriculumController.step() in train_unizero_multitask_balance_segment_ddp.py calls both helpers without their mandatory `logger` argument, so every curriculum stage switch dies with a TypeError instead of logging the freeze/trainable summary. Use `logging.getLogger()`, matching the reference calls in lzero/entry/utils.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CurriculumController.step()inlzero/entry/train_unizero_multitask_balance_segment_ddp.pyraises
TypeErrorthe first time a curriculum stage switch happens, so the balanced-segmentmultitask UniZero DDP entry crashes exactly at the moment the curriculum is supposed to advance.
Both logging helpers it calls take a mandatory
logger:but all four call sites omit it:
The helpers use the argument immediately and unconditionally (
logger.info(...)), so there isno default to fall back on.
Fix
Pass
logging.getLogger(), which is exactly whatlzero/entry/utils.py's own reference callsuse for this function:
The file already does
from ditk import logging(L18) and logs through the root loggereverywhere else in this method (
logging.info(...)at L115/118/122/126/129/133/141), sologging.getLogger()routes these lines to the same place as their surrounding messages —no new logger, no config change.
logging.getLogger()is the established idiom in this repo(
lzero/agent/*.pyall use it).Verification
Signature mismatch, so no training run is needed. I extracted both helper signatures from
main(
9ccf29b) by AST and replayed the call shapes throughinspect.Signature.bind:🤖 Generated with Claude Code