From 3d91de8c76c944f65705574aa7d241e467775cff Mon Sep 17 00:00:00 2001 From: luv-bansal Date: Mon, 27 Jan 2025 03:32:15 -0500 Subject: [PATCH 1/6] Health port to None in tests --- .pre-commit-config.yaml | 2 +- clarifai/runners/models/model_run_locally.py | 1 + tests/runners/test_runners.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be1d8e69..9b7e5d68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ default_stages: - - commit + - pre-commit - manual repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/clarifai/runners/models/model_run_locally.py b/clarifai/runners/models/model_run_locally.py index 6164a4bf..d83fa326 100644 --- a/clarifai/runners/models/model_run_locally.py +++ b/clarifai/runners/models/model_run_locally.py @@ -224,6 +224,7 @@ def _run_test(self): nodepool_id="n/a", compute_cluster_id="n/a", user_id="n/a", + health_check_port=None, ) # send an inference. self._run_model_inference(runner) diff --git a/tests/runners/test_runners.py b/tests/runners/test_runners.py index ceb2a90e..a9aae234 100644 --- a/tests/runners/test_runners.py +++ b/tests/runners/test_runners.py @@ -183,6 +183,7 @@ def setup_class(cls): num_parallel_polls=1, base_url=cls.AUTH.base, user_id=cls.AUTH.user_id, + health_check_port=None, ) cls.thread = threading.Thread(target=cls.runner.start) cls.thread.daemon = True # close when python closes @@ -499,6 +500,7 @@ def setup_class(cls): num_parallel_polls=1, base_url=cls.AUTH.base, user_id=cls.AUTH.user_id, + health_check_port=None, ) cls.model = Model( user_id=cls.AUTH.user_id, From 911bab56ea23be1986b5706de2deeda39983e394 Mon Sep 17 00:00:00 2001 From: luv-bansal Date: Mon, 27 Jan 2025 03:33:38 -0500 Subject: [PATCH 2/6] upgrade packages --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6fb2f9b2..dec59390 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -clarifai-grpc>=11.0.4 -clarifai-protocol>=0.0.14 +clarifai-grpc>=11.0.5 +clarifai-protocol>=0.0.16 numpy>=1.22.0 tqdm>=4.65.0 rich>=13.4.2 From 218d5026729b584395e5e40f7d9e9c5918d0d5b5 Mon Sep 17 00:00:00 2001 From: luv-bansal Date: Mon, 27 Jan 2025 04:04:52 -0500 Subject: [PATCH 3/6] precommit to commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b7e5d68..be1d8e69 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ default_stages: - - pre-commit + - commit - manual repos: - repo: https://github.com/pre-commit/pre-commit-hooks From efce54b80eef0f2c65e550d03f0770695c040d41 Mon Sep 17 00:00:00 2001 From: luv-bansal Date: Mon, 27 Jan 2025 04:23:14 -0500 Subject: [PATCH 4/6] docker tests --- tests/runners/test_model_run_locally.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/runners/test_model_run_locally.py b/tests/runners/test_model_run_locally.py index 5cece674..4cce664b 100644 --- a/tests/runners/test_model_run_locally.py +++ b/tests/runners/test_model_run_locally.py @@ -168,7 +168,7 @@ def test_test_model_success(model_run_locally): # @pytest.mark.skipif(shutil.which("docker") is None, reason="Docker not installed or not in PATH.") -@pytest.mark.skip(reason="Will add later after new clarifai package is released") +# @pytest.mark.skip(reason="Will add later after new clarifai package is released") def test_docker_build_and_test_container(model_run_locally): """ Test building a Docker image and running a container test using the dummy model. @@ -230,7 +230,7 @@ def test_hf_test_model_success(hf_model_run_locally): # @pytest.mark.skipif(shutil.which("docker") is None, reason="Docker not installed or not in PATH.") -@pytest.mark.skip(reason="Will add later after new clarifai package is released") +# @pytest.mark.skip(reason="Will add later after new clarifai package is released") def test_hf_docker_build_and_test_container(hf_model_run_locally): """ Test building a Docker image and running a container test using the dummy model. From 18c55a11704991360943d924224c39674901f142 Mon Sep 17 00:00:00 2001 From: luv-bansal Date: Mon, 27 Jan 2025 04:53:07 -0500 Subject: [PATCH 5/6] skip docker tests --- tests/runners/test_model_run_locally.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/runners/test_model_run_locally.py b/tests/runners/test_model_run_locally.py index 4cce664b..5cece674 100644 --- a/tests/runners/test_model_run_locally.py +++ b/tests/runners/test_model_run_locally.py @@ -168,7 +168,7 @@ def test_test_model_success(model_run_locally): # @pytest.mark.skipif(shutil.which("docker") is None, reason="Docker not installed or not in PATH.") -# @pytest.mark.skip(reason="Will add later after new clarifai package is released") +@pytest.mark.skip(reason="Will add later after new clarifai package is released") def test_docker_build_and_test_container(model_run_locally): """ Test building a Docker image and running a container test using the dummy model. @@ -230,7 +230,7 @@ def test_hf_test_model_success(hf_model_run_locally): # @pytest.mark.skipif(shutil.which("docker") is None, reason="Docker not installed or not in PATH.") -# @pytest.mark.skip(reason="Will add later after new clarifai package is released") +@pytest.mark.skip(reason="Will add later after new clarifai package is released") def test_hf_docker_build_and_test_container(hf_model_run_locally): """ Test building a Docker image and running a container test using the dummy model. From 5d05f5d27e5690093aaf592a48955b603ba9fe0c Mon Sep 17 00:00:00 2001 From: luv-bansal Date: Mon, 27 Jan 2025 05:30:01 -0500 Subject: [PATCH 6/6] remove requests version --- tests/runners/hf_mbart_model/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/runners/hf_mbart_model/requirements.txt b/tests/runners/hf_mbart_model/requirements.txt index fdb027d6..63d7193f 100644 --- a/tests/runners/hf_mbart_model/requirements.txt +++ b/tests/runners/hf_mbart_model/requirements.txt @@ -4,4 +4,4 @@ transformers>=4.44 accelerate>=1.0.1 optimum>=1.20.0 sentencepiece==0.2.0 -requests==2.23.0 +requests