feat(serve): add SageMaker GenAI inference benchmarking and recommendation#5874
Open
ZealSV wants to merge 1 commit into
Open
feat(serve): add SageMaker GenAI inference benchmarking and recommendation#5874ZealSV wants to merge 1 commit into
ZealSV wants to merge 1 commit into
Conversation
c0cfc77 to
747baeb
Compare
…ation
Adds sagemaker.serve.ai_inference_recommender, a thin ergonomic layer
over the auto-generated AIBenchmarkJob, AIRecommendationJob, and
AIWorkloadConfig resources in sagemaker-core.
ModelBuilder gains two methods:
job = mb.start_benchmark(endpoint=ep, workload=Workload.synthetic(...))
job = mb.start_inference_recommendation(workload, throughput,
instance_types=[ml.g6.12xlarge])
After the job reaches a terminal state, customers retrieve results via
constructors that wrap the auto-gen job resource:
result = BenchmarkResult.from_job(job)
rec = Recommendation.from_job(job)
endpoint = rec.deploy(role=...)
Public surface added under sagemaker.serve:
* Workload — typed factory (synthetic) that builds the WorkloadSpec
inline JSON envelope. Extra AIPerf parameters flow through **params
unchecked and are validated server-side.
* BenchmarkResult / BenchmarkMetrics / BenchmarkMetric — parses the
AIPerf profile_export_aiperf.json out of the output.tar.gz artifact.
* Recommendation — wrapper around one row of an AIRecommendationJob's
recommendations list. .deploy() prefers the ModelPackage path,
falls back to a raw image_uri + S3 channels container definition.
* Secret — helper around AWS Secrets Manager for hf_token round-trip.
* BenchmarkJob, RecommendationJob — re-exports of the auto-gen classes
without the AI prefix.
* FeatureGatedError, WorkloadValidationError — typed exceptions.
747baeb to
bb8c26a
Compare
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.
Adds sagemaker.serve.ai_inference_recommender, a thin ergonomic layer over the auto-generated AIBenchmarkJob, AIRecommendationJob, and AIWorkloadConfig resources in sagemaker-core.
ModelBuilder gains two methods:
job = mb.start_benchmark(endpoint=ep, workload=Workload.synthetic(...))
job = mb.start_inference_recommendation(workload, throughput,
instance_types=[ml.g6.12xlarge])
After the job reaches a terminal state, customers retrieve results via constructors that wrap the auto-gen job resource:
result = BenchmarkResult.from_job(job)
rec = Recommendation.from_job(job)
endpoint = rec.deploy(role=...)
Public surface added under sagemaker.serve:
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.