-
Notifications
You must be signed in to change notification settings - Fork 1.2k
change: use recommended inference image URI from Neo API #2806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
dde8d00
0f72907
0bae071
17fe93e
0a8ca6a
08c3a7b
1d5a5dc
edbf61f
d28b89f
185b4b0
5ec2ff4
cec05a5
1312575
6319bce
f728e11
beeabbd
005ded3
81b77c8
c8ca3b7
7104337
ad29a0c
bbe6284
b026769
439d085
de9ad6b
6f98534
87c1d2c
b31dd14
8210375
972a6d2
7206b9e
127c964
554d735
431e853
81af309
a949e5f
888153b
b796a00
9d25fcf
64e4690
814dd3d
13aa858
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
DESCRIBE_COMPILATION_JOB_RESPONSE = { | ||
"CompilationJobStatus": "Completed", | ||
"ModelArtifacts": {"S3ModelArtifacts": "s3://output-path/model.tar.gz"}, | ||
"InferenceImage": "inference-container-uri", | ||
} | ||
|
||
|
||
|
@@ -52,12 +53,7 @@ def test_compile_model_for_inferentia(sagemaker_session): | |
framework_version="1.15.0", | ||
job_name="compile-model", | ||
) | ||
assert ( | ||
"{}.dkr.ecr.{}.amazonaws.com/sagemaker-neo-tensorflow:1.15.0-inf-py3".format( | ||
NEO_REGION_ACCOUNT, REGION | ||
) | ||
== model.image_uri | ||
) | ||
assert DESCRIBE_COMPILATION_JOB_RESPONSE["InferenceImage"] == model.image_uri | ||
assert model._is_compiled_model is True | ||
|
||
|
||
|
@@ -286,7 +282,7 @@ def test_compile_with_framework_version_15(session): | |
job_name="compile-model", | ||
) | ||
|
||
assert "1.5" in model.image_uri | ||
assert model.image_uri is not None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any specific reason we are not checking "1.5" here in image uri There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the uri is fetched from Neo API now, I think it would be suffice to just check that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should still check for 1.5 to make sure the uri we are receiving is as expected There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that is possible. Checking |
||
|
||
|
||
@patch("sagemaker.session.Session") | ||
|
@@ -304,26 +300,7 @@ def test_compile_with_framework_version_16(session): | |
job_name="compile-model", | ||
) | ||
|
||
assert "1.6" in model.image_uri | ||
|
||
|
||
@patch("sagemaker.session.Session") | ||
def test_compile_validates_framework_version(session): | ||
session.return_value.boto_region_name = REGION | ||
|
||
model = _create_model() | ||
with pytest.raises(ValueError) as e: | ||
model.compile( | ||
target_instance_family="ml_c4", | ||
input_shape={"data": [1, 3, 1024, 1024]}, | ||
output_path="s3://output", | ||
role="role", | ||
framework="pytorch", | ||
framework_version="1.6.1", | ||
job_name="compile-model", | ||
) | ||
|
||
assert "Unsupported neo-pytorch version: 1.6.1." in str(e) | ||
Comment on lines
-310
to
-326
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any specific reason we are removing negative test case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as the previous reply. |
||
assert model.image_uri is not None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
|
||
|
||
@patch("sagemaker.session.Session") | ||
|
Uh oh!
There was an error while loading. Please reload this page.