|
16 | 16 |
|
17 | 17 | import pytest
|
18 | 18 | from botocore.config import Config
|
19 |
| -from sagemaker import Session |
20 |
| -from sagemaker.fw_registry import default_framework_uri |
21 | 19 |
|
| 20 | +from sagemaker import image_uris, Session |
| 21 | +from sagemaker.network import NetworkConfig |
22 | 22 | from sagemaker.processing import (
|
23 | 23 | ProcessingInput,
|
24 | 24 | ProcessingOutput,
|
|
27 | 27 | ProcessingJob,
|
28 | 28 | )
|
29 | 29 | from sagemaker.sklearn.processing import SKLearnProcessor
|
30 |
| -from sagemaker.network import NetworkConfig |
31 | 30 | from tests.integ import DATA_DIR
|
32 | 31 | from tests.integ.kms_utils import get_or_create_kms_key
|
33 | 32 |
|
@@ -59,10 +58,18 @@ def sagemaker_session_with_custom_bucket(
|
59 | 58 |
|
60 | 59 |
|
61 | 60 | @pytest.fixture(scope="module")
|
62 |
| -def image_uri(sagemaker_session): |
63 |
| - image_tag = "{}-{}-{}".format("0.20.0", "cpu", "py3") |
64 |
| - return default_framework_uri( |
65 |
| - "scikit-learn", sagemaker_session.boto_session.region_name, image_tag |
| 61 | +def image_uri( |
| 62 | + scikit_learn_latest_version, |
| 63 | + scikit_learn_latest_py_version, |
| 64 | + cpu_instance_type, |
| 65 | + sagemaker_session, |
| 66 | +): |
| 67 | + return image_uris.retrieve( |
| 68 | + "scikit-learn", |
| 69 | + sagemaker_session.boto_region_name, |
| 70 | + version=scikit_learn_latest_version, |
| 71 | + py_version=scikit_learn_latest_py_version, |
| 72 | + instance_type=cpu_instance_type, |
66 | 73 | )
|
67 | 74 |
|
68 | 75 |
|
|
0 commit comments