Skip to content

Commit 10887d7

Browse files
committed
fix unit test
1 parent 7d403a6 commit 10887d7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

ads/opctl/backend/local.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -709,13 +709,6 @@ def predict(self) -> None:
709709
timeout=timeout,
710710
force_overwrite=True,
711711
)
712-
if (
713-
not os.path.exists(artifact_directory)
714-
or len(os.listdir(artifact_directory)) == 0
715-
):
716-
raise ValueError(
717-
f"`artifact_directory` {artifact_directory} does not exist or is empty."
718-
)
719712

720713
# conda
721714
conda_slug, conda_path = self.config["execution"].get("conda_slug"), self.config["execution"].get("conda_path")

tests/unitary/with_extras/opctl/test_opctl_local_model_deployment_backend.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_predict(self, mock_path_exists, mock_list_dir):
123123
"bind": "/opt/ds/model/deployed_model/"
124124
},
125125
},
126-
"/opt/ds/model/deployed_model/ fake_data fake_id fake_id",
126+
"/opt/ds/model/deployed_model/ fake_data",
127127
install=True,
128128
conda_uri="fake_path",
129129
)
@@ -148,6 +148,7 @@ def test_predict_download(
148148
return_value=0,
149149
) as mock__run_with_conda_pack:
150150
backend = LocalModelDeploymentBackend(self.config)
151+
151152
backend.predict()
152153
mock__download.assert_called_once_with(
153154
oci_auth=backend.oci_auth,
@@ -169,7 +170,7 @@ def test_predict_download(
169170
"bind": "/opt/ds/model/deployed_model/"
170171
},
171172
},
172-
"/opt/ds/model/deployed_model/ fake_data fake_id fake_id",
173+
"/opt/ds/model/deployed_model/ fake_data",
173174
install=True,
174175
conda_uri="fake_path",
175176
)

0 commit comments

Comments
 (0)