Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
kevintli
added this pull request to stack #13
September 30, 2026 22:15
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.
Summary
Fixes an issue with CLI arg ordering that prevented us from appending Miles args like
--qkv_format, which we needed for our gpt-oss-20b Spindle runs.Details
Due to a quirk with how Miles parses CLI args, the effective ordering for Spindle CLI args is:
add_miles_arguments, which first runs Spindle'sadd_custom_argumentshook before registering its own args. It's unclear exactly why, but potentially Miles does this because it wants to prevent users' hook from unintentionally overriding its own arg definitions.However, our
add_custom_argumentshook relies on whatever CLI options have been registered by that time in order to perform validation, so it fails if the user tries to pass Miles args which haven't been registered by that time.The workaround is to change our setup to
defer_config_overrides, which applies the configs only after all CLI options are registered.Testing
Verified inside the actual trainer image (
radixark/miles:v0.1.0plus the pinned Megatron) with the gpt-osscli_options. Previously this failed onqkv_format. It now parses toqkv_format=thd, attention_backend=fused, moe_permute_fusion=False, recompute_*=full/uniform/1. Added a unit test covering options that are registered after the hook runs.Stacked on #4.
Link to Devin session: https://modal.devinenterprise.com/sessions/f53cfabb210146de8f0338fe388d7973
Open in Devin Desktop: https://modal.devinenterprise.com/desktop/session/f53cfabb210146de8f0338fe388d7973?variant=devin
Requested by: @kevintli