Skip to content

Commit 8b872b6

Browse files
committed
fix the test
1 parent 2ac2a3d commit 8b872b6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

ads/opctl/backend/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ def predict(self) -> None:
716716
conda_slug, conda_path = self.config["execution"].get("conda_slug"), self.config["execution"].get("conda_path")
717717
if not conda_slug and not conda_path and ocid:
718718
conda_slug, conda_path = self._get_conda_info_from_custom_metadata(ocid)
719-
if not conda_path and not conda_path:
719+
if not conda_slug and not conda_path:
720720
conda_slug, conda_path = self._get_conda_info_from_runtime(
721721
artifact_dir=artifact_directory
722722
)

tests/unitary/with_extras/opctl/test_opctl_local_model_deployment_backend.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ def test_predict_download_in_notebook(
188188
timeout=None,
189189
force_overwrite=True,
190190
)
191-
dir_path = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../../"))
192-
script_path = os.path.join(dir_path, "ads/opctl/backend/../script.py")
193191
mock_run_command.assert_called_once_with(
194-
cmd=f"python {script_path} --artifact-directory /Users/ziye/.ads_ops/models/fake_id --payload 'fake_data' --auth api_key --profile DEFAULT", shell=True
192+
cmd="python /home/runner/work/accelerated-data-science/accelerated-data-science/ads/opctl/backend/../script.py --artifact-directory /home/runner/.ads_ops/models/fake_id --payload 'fake_data' --auth api_key --profile DEFAULT", shell=True
195193
)

0 commit comments

Comments
 (0)