|
40 | 40 | from ads.model.deployment.common.utils import State as ModelDeploymentState
|
41 | 41 | from ads.model.generic_model import (
|
42 | 42 | _ATTRIBUTES_TO_SHOW_,
|
| 43 | + ArtifactsNotAvailableError, |
43 | 44 | GenericModel,
|
44 | 45 | NotActiveDeploymentError,
|
45 |
| - ArtifactsNotAvailableError, |
46 | 46 | SummaryStatus,
|
47 | 47 | _prepare_artifact_dir,
|
48 | 48 | )
|
|
165 | 165 |
|
166 | 166 | INFERENCE_CONDA_ENV = "oci://bucket@namespace/<path_to_service_pack>"
|
167 | 167 | TRAINING_CONDA_ENV = "oci://bucket@namespace/<path_to_service_pack>"
|
168 |
| -DEFAULT_PYTHON_VERSION = "3.8" |
| 168 | +DEFAULT_PYTHON_VERSION = "3.12" |
169 | 169 | MODEL_FILE_NAME = "fake_model_name"
|
170 | 170 | FAKE_MD_URL = "http://<model-deployment-url>"
|
171 | 171 |
|
@@ -257,7 +257,8 @@ def test__handle_model_file_name_raise_error(self):
|
257 | 257 | def test_prepare(self, mock_signer):
|
258 | 258 | """prepare a trained model."""
|
259 | 259 | self.generic_model.prepare(
|
260 |
| - "oci://service-conda-packs@ociodscdev/service_pack/cpu/General_Machine_Learning_for_CPUs/1.0/mlcpuv1", |
| 260 | + inference_conda_env="oci://service-conda-packs@ociodscdev/service_pack/cpu/General_Machine_Learning_for_CPUs/1.0/mlcpuv1", |
| 261 | + inference_python_version=DEFAULT_PYTHON_VERSION, |
261 | 262 | model_file_name="fake_model_name",
|
262 | 263 | )
|
263 | 264 |
|
@@ -1449,7 +1450,8 @@ def test__to_dict_not_prepared(self):
|
1449 | 1450 | @patch("ads.common.auth.default_signer")
|
1450 | 1451 | def test__to_dict_prepared(self, moxk_signer):
|
1451 | 1452 | self.generic_model.prepare(
|
1452 |
| - "oci://service-conda-packs@ociodscdev/service_pack/cpu/General_Machine_Learning_for_CPUs/1.0/mlcpuv1" |
| 1453 | + inference_conda_env="oci://service-conda-packs@ociodscdev/service_pack/cpu/General_Machine_Learning_for_CPUs/1.0/mlcpuv1", |
| 1454 | + inference_python_version=DEFAULT_PYTHON_VERSION |
1453 | 1455 | )
|
1454 | 1456 | dictionary = self.generic_model._to_dict()
|
1455 | 1457 | for key in _ATTRIBUTES_TO_SHOW_:
|
@@ -2255,7 +2257,7 @@ class TestCommonMethods:
|
2255 | 2257 | def test__prepare_artifact_dir(
|
2256 | 2258 | self, mock_signer, mock_mkdtemp, test_value, expected_value
|
2257 | 2259 | ):
|
2258 |
| - """Ensures that artifact dir name can be benerated propertly.""" |
| 2260 | + """Ensures that artifact dir name can be generated propertly.""" |
2259 | 2261 |
|
2260 | 2262 | assert (
|
2261 | 2263 | _prepare_artifact_dir(test_value) == expected_value
|
|
0 commit comments