Use registered RLix bucket size argument#15
Open
TianyeGGBond wants to merge 1 commit into
Open
Conversation
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.
Context
--miles-model-update-bucket-size-mbis registered unconditionally byadd_rlix_argumentsinmiles/utils/arguments.py, withdefault=512. Sinceadd_rlix_argumentsis always applied during argument construction, runtime users can readargs.miles_model_update_bucket_size_mbdirectly.Two call sites still had defensive fallbacks that repeated the same
512default:MegatronTrainRayActor._ensure_cpu_bucket_cacheassert_rlix_topologyinmiles/utils/rlix_validation.pyThose fallbacks are unnecessary and make the default value live in multiple places.
What changed
getattr(self.args, miles_model_update_bucket_size_mb, 512)with directself.args.miles_model_update_bucket_size_mbaccess inactor.py.getattr(args, miles_model_update_bucket_size_mb, 512) or 512with directargs.miles_model_update_bucket_size_mbaccess inrlix_validation.py.arguments.py.Why
This keeps the bucket-size default in one place and avoids drift if the default changes later. It also matches the argument registration contract: the field is expected to exist after parser setup.
Validation
python -m py_compile miles/backends/megatron_utils/actor.py miles/utils/rlix_validation.pygit diff --checkgit grep -n miles_model_update_bucket_size_mb\|miles-model-update-bucket-size-mb -- milesto confirm the remaining default definition is centralized inarguments.py