Skip to content

Use registered RLix bucket size argument#15

Open
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/m11-mvp-testfrom
TianyeGGBond:tianye/use-bucket-size-arg
Open

Use registered RLix bucket size argument#15
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/m11-mvp-testfrom
TianyeGGBond:tianye/use-bucket-size-arg

Conversation

@TianyeGGBond

Copy link
Copy Markdown

Context

--miles-model-update-bucket-size-mb is registered unconditionally by add_rlix_arguments in miles/utils/arguments.py, with default=512. Since add_rlix_arguments is always applied during argument construction, runtime users can read args.miles_model_update_bucket_size_mb directly.

Two call sites still had defensive fallbacks that repeated the same 512 default:

  • MegatronTrainRayActor._ensure_cpu_bucket_cache
  • assert_rlix_topology in miles/utils/rlix_validation.py

Those fallbacks are unnecessary and make the default value live in multiple places.

What changed

  • Replaced getattr(self.args, miles_model_update_bucket_size_mb, 512) with direct self.args.miles_model_update_bucket_size_mb access in actor.py.
  • Replaced getattr(args, miles_model_update_bucket_size_mb, 512) or 512 with direct args.miles_model_update_bucket_size_mb access in rlix_validation.py.
  • Left the actual default centralized in 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.py
  • git diff --check
  • git grep -n miles_model_update_bucket_size_mb\|miles-model-update-bucket-size-mb -- miles to confirm the remaining default definition is centralized in arguments.py

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