Introduce replica_count support for training and deprecate node_count (#383)#401
Draft
FarhanTejani wants to merge 1 commit intoaws:mainfrom
Draft
Introduce replica_count support for training and deprecate node_count (#383)#401FarhanTejani wants to merge 1 commit intoaws:mainfrom
FarhanTejani wants to merge 1 commit intoaws:mainfrom
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.
What's changing and why?
Closes #383
node_countis overloaded: it sets both the number of job replicas and triggers full-node resource allocation. This means users who want multiple replicas with granular resource requests (e.g. 4 replicas each with 2 GPUs) have no way to express that.This PR introduces
replica_countto decouple replica specification from resource allocation, and deprecatesnode_count. The naming aligns with the inference CLI, which already usesreplica_count/max_replica_count/min_replica_count.New parameters
replica_count- number of job replicas (pods). Can be combined with resource fields.max_replica_count- maximum replicas for elastic training.Deprecated parameters (kept as aliases)
node_count- alias forreplica_countthat also triggers full-node resource allocation from instance constants (preserves existing behavior).max_node_count- alias formax_replica_count.Deprecated fields are marked with
"deprecated": truein the schema and[DEPRECATED]in descriptions.hyp inithides deprecated fields from generated config templates. CLI--helpshows the deprecation tag.Additional cleanup
node_count+ resources mutual exclusivity check from_is_valid()to the model validator, with an actionable error message guiding users toreplica_count.Before/After UX
Before (impossible):
After:
Existing behavior preserved:
Improved error message:
How was this change tested?
hyp inithides deprecated fields--replica-countand--max-replica-countCLI flags are auto-generatedAre unit tests added?
Yes.
TestReplicaCountclass with 10 tests:Are integration tests added?
Updated existing integ test for new error message format.
Reviewer Guidelines
One of the following must be true: