feat: Add per-service instance type support in launcher - #87
Open
gabrielzpascual wants to merge 1 commit into
Open
feat: Add per-service instance type support in launcher#87gabrielzpascual wants to merge 1 commit into
gabrielzpascual wants to merge 1 commit into
Conversation
|
lgtm |
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.
Description
Motivation
Multi-service training jobs (such as RFT/Storm RL) deploy multiple pods with different compute requirement. GPU-intensive services (training, inference) alongside CPU-only orchestration services (messaging, scheduling, reward computation). Currently, all services are scheduled on the same instance type, forcing expensive GPU instances to be used even for lightweight CPU workloads.
This change adds per-service instance type targeting, enabling deployments where a single job spans multiple instance types within the same cluster. GPU services target GPU nodes while CPU services route to cheaper CPU nodes, reducing cost and improving resource utilization.
Changes
get_instance_types_map()function to build a per-service instance type mapping from config_get_instance_type_for_service()method to resolve instance type for each service with fallback to default_build_label_selector_for_instance()method to construct node affinity label selectors per instance type_map_resource_config()to set per-serviceinstanceTypeandlabelSelector_set_efa_resources()to calculate EFA counts per-service based on their target instance typelabelSelector: nullfield to RFT helm values (falls back to global when null)instance_types: nullconfig field torecipes_collection/config.yamlTesting
Tested on a HyperPod RIG cluster with mixed instance groups:
Verified:
node.kubernetes.io/instance-typeandsagemaker.amazonaws.com/instance-group-type: Restrictedinstance_typesentry use the globalinstance_typedefaultUsage:
Merge Checklist
Put an x in the boxes that apply. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General
pre-commit run --all-fileson my code. It will check for this configuration.Tests
pyteston my code and all unit tests passed.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.