Skip to content

feature: support custom hub_name in fine-tuning trainers and model evaluators for private hub testing#5781

Closed
mollyheamazon wants to merge 1 commit intoaws:masterfrom
mollyheamazon:feat/private-hub
Closed

feature: support custom hub_name in fine-tuning trainers and model evaluators for private hub testing#5781
mollyheamazon wants to merge 1 commit intoaws:masterfrom
mollyheamazon:feat/private-hub

Conversation

@mollyheamazon
Copy link
Copy Markdown
Contributor

Issue

Fine-tuning trainers (SFTTrainer, DPOTrainer, RLVRTrainer, RLAIFTrainer)
and model evaluators (BenchMarkEvaluator, CustomScorerEvaluator) hardcode
hub_name="SageMakerPublicHub" when fetching recipes, override parameters, and
studio tags. This blocks development and E2E testing of new recipes — a recipe
can only be exercised end-to-end after it ships to the public JumpStart hub,
delaying any PySDK fixes or support work that depends on the recipe.

Studio already uses private hubs for its own E2E suite; PySDK trainers need to
support the same pattern so test accounts can publish a pre-release recipe to a
private hub and exercise the full trainer path against it.

Description

Adds an optional hub_name parameter that threads through all hub-content
lookups in the trainer and evaluator flows. Defaults to "SageMakerPublicHub"
so existing callers are unaffected.

Usage

# Default behavior — unchanged
SFTTrainer(model="meta-textgeneration-llama-3-2-1b-instruct", ...)

# Test a pre-release recipe from a private hub
SFTTrainer(
   model="my-prerelease-model",
   model_package_group="my-group",
   hub_name="MyPrivateHub",
)

# Same pattern works for DPOTrainer, RLVRTrainer, RLAIFTrainer,
# BenchMarkEvaluator, CustomScorerEvaluator

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mollyheamazon mollyheamazon changed the title feature: support custom hub_name in Fine-tuning trainers and model evaluators for private hub testing feature: support custom hub_name in fine-tuning trainers and model evaluators for private hub testing Apr 21, 2026
@mollyheamazon mollyheamazon marked this pull request as ready for review April 21, 2026 00:43
Can include training and validation datasets.
environment (Optional[Dict[str, str]]):
Environment variables to set in the training container.
hub_name (Optional[str]):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a customer accessible feature so we should avoid having this documented where customers can see it

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.

2 participants