File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3251,7 +3251,9 @@ def upload(
3251
3251
container_spec = local_model .get_serving_container_spec ()
3252
3252
appended_user_agent = [prediction_constants .CUSTOM_PREDICTION_ROUTINES ]
3253
3253
else :
3254
- if not serving_container_image_uri :
3254
+ # Referenced models do not have container_image and artifact_uri
3255
+ # Skip the container_image if this is a referenced model
3256
+ if not serving_container_image_uri and artifact_uri :
3255
3257
raise ValueError (
3256
3258
"The parameter `serving_container_image_uri` is required "
3257
3259
"if no `local_model` is provided."
Original file line number Diff line number Diff line change @@ -1293,6 +1293,7 @@ def test_upload_without_serving_container_image_uri_throw_error(
1293
1293
display_name = _TEST_MODEL_NAME ,
1294
1294
serving_container_predict_route = _TEST_SERVING_CONTAINER_PREDICTION_ROUTE ,
1295
1295
serving_container_health_route = _TEST_SERVING_CONTAINER_HEALTH_ROUTE ,
1296
+ artifact_uri = _TEST_ARTIFACT_URI ,
1296
1297
)
1297
1298
1298
1299
assert str (exception .value ) == expected_message
You can’t perform that action at this time.
0 commit comments