feat: bedrock-oss-provisioned-throughput-polling#5893
Open
lucasjia-aws wants to merge 2 commits into
Open
Conversation
07f6443 to
456b788
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.
Description
Add provisioned throughput polling for Bedrock OSS (non-Nova) model deployments.
Previously,
BedrockModelBuilder.deploy()for OSS models would fire off acreate_model_import_jobcall and return immediately, leaving the user to manually wait for the import to complete and then create provisioned throughput themselves. This PR makes the non-Nova path synchronous end-to-end, matching the behavior of the Nova deployment path.Changes
Implementation (
bedrock_model_builder.py):deploy()now waits for the import job to complete, then creates provisioned model throughput and waits for it to becomeInServicebefore returning.create_provisioned_throughput()— creates provisioned throughput for an imported model and polls until ready._wait_for_import_job_complete(),_wait_for_provisioned_throughput_in_service().deploy()parameters for non-Nova path:provisioned_model_name,model_units,commitment_duration,provisioned_model_tags.Unit tests (
test_bedrock_model_builder.py):TestWaitForImportJobComplete,TestCreateProvisionedThroughput,TestWaitForProvisionedThroughputInService.Integration test (
test_bedrock_provisioned_throughput.py):create_provisioned_throughput()usage.Testing
CreateProvisionedModelThroughputAPI call all succeeded (blocked only by account-level service quota, not code issues).