Skip to content

Commit 9ce7df3

Browse files
committed
feat: add import job polling and provisioned throughput for Bedrock OSS deployments
- deploy() for non-Nova models now waits for import job completion and returns job details (model ready for on-demand inference). - New public method: create_provisioned_throughput() with polling. - New private methods: _wait_for_import_job_complete(), _wait_for_provisioned_throughput_in_service(). - Added unit tests and integ tests (serial to avoid concurrent quota issues). - Mark bedrock integ tests as serial to avoid concurrent import job quota issues. X-AI-Prompt: add import polling and PT for bedrock OSS deployments X-AI-Tool: kiro-cli
1 parent fda2565 commit 9ce7df3

15 files changed

Lines changed: 859 additions & 97 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"timestamp": "20260603T175225Z",
3+
"api": "create_custom_model",
4+
"request": {
5+
"modelName": "nova-m",
6+
"modelSourceConfig": {
7+
"s3DataSource": {
8+
"s3Uri": "s3://b/ckpt"
9+
}
10+
},
11+
"roleArn": "r"
12+
},
13+
"response": {
14+
"modelArn": "arn:m"
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"timestamp": "20260603T175226Z",
3+
"api": "create_custom_model",
4+
"request": {
5+
"modelName": "my-model",
6+
"modelSourceConfig": {
7+
"s3DataSource": {
8+
"s3Uri": "s3://b/k"
9+
}
10+
},
11+
"roleArn": "r"
12+
},
13+
"response": {
14+
"modelArn": "arn"
15+
}
16+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"timestamp": "20260603T175227Z",
3+
"api": "create_custom_model",
4+
"request": {
5+
"modelName": "m",
6+
"modelSourceConfig": {
7+
"s3DataSource": {
8+
"s3Uri": "s3://b/k"
9+
}
10+
},
11+
"roleArn": "r",
12+
"modelTags": [
13+
{
14+
"Key": "env",
15+
"Value": "test"
16+
}
17+
]
18+
},
19+
"response": {
20+
"modelArn": "arn"
21+
}
22+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"timestamp": "20260603T175224Z",
3+
"api": "create_custom_model_deployment",
4+
"request": {
5+
"modelDeploymentName": "d",
6+
"modelArn": "arn:model"
7+
},
8+
"response": {}
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"timestamp": "20260603T175225Z",
3+
"api": "create_custom_model_deployment",
4+
"request": {
5+
"modelDeploymentName": "nova-m-deployment",
6+
"modelArn": "arn:m"
7+
},
8+
"response": {
9+
"customModelDeploymentArn": "arn:dep"
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"timestamp": "20260603T175226Z",
3+
"api": "create_custom_model_deployment",
4+
"request": {
5+
"modelDeploymentName": "my-model-deployment",
6+
"modelArn": "arn"
7+
},
8+
"response": {
9+
"customModelDeploymentArn": "dep"
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"timestamp": "20260603T175227Z",
3+
"api": "create_custom_model_deployment",
4+
"request": {
5+
"modelDeploymentName": "m-deployment",
6+
"modelArn": "arn"
7+
},
8+
"response": {
9+
"customModelDeploymentArn": "dep"
10+
}
11+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"timestamp": "20260603T174422Z",
3+
"api": "create_model_import_job",
4+
"request": {
5+
"jobName": "test-import-poll-1780508661-4090",
6+
"importedModelName": "test-import-model-1780508661-4090",
7+
"roleArn": "arn:aws:iam::729646638167:role/Admin",
8+
"modelDataSource": {
9+
"s3DataSource": {
10+
"s3Uri": "s3://mc-flows-sdk-testing/output/meta-textgeneration-llama-3-2-1b-instruct-rlaif-20251202102827/output/model/checkpoints/hf_merged/"
11+
}
12+
}
13+
},
14+
"response": {
15+
"jobArn": "arn:aws:bedrock:us-west-2:729646638167:model-import-job/dx6dp58zqa08"
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"timestamp": "20260603T175224Z",
3+
"api": "create_model_import_job",
4+
"request": {
5+
"jobName": "j",
6+
"importedModelName": "m",
7+
"roleArn": "r",
8+
"modelDataSource": {
9+
"s3DataSource": {
10+
"s3Uri": "s3://b/m.tar.gz"
11+
}
12+
}
13+
},
14+
"response": {
15+
"jobArn": "arn:job"
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"timestamp": "20260603T175225Z",
3+
"api": "create_model_import_job",
4+
"request": {
5+
"jobName": "j",
6+
"importedModelName": "m",
7+
"roleArn": "r",
8+
"modelDataSource": {
9+
"s3DataSource": {
10+
"s3Uri": "s3://b/m.tar.gz"
11+
}
12+
}
13+
},
14+
"response": {
15+
"jobArn": "arn:job"
16+
}
17+
}

0 commit comments

Comments
 (0)