From 9fd4fe7aae8d049625cdbd439fa9979c63a9a61b Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 09:27:24 +0100 Subject: [PATCH 01/11] chore: bump hubble version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index be7f48dd6..64c5890cb 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ 'docarray[common]>=0.20.1', 'trimesh==3.16.4', 'finetuner-stubs==0.12.4rc13', - 'jina-hubble-sdk==0.24.0', + 'jina-hubble-sdk==0.33.1', ], extras_require={ 'full': [ From 750753e7d3ade0bd9edd3b76edbf6ceb42ca14c2 Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 09:32:32 +0100 Subject: [PATCH 02/11] chore: add line to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31e5cba9e..31ce1e620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add proper CSV file for image-image case. ([#667](https://github.com/jina-ai/finetuner/pull/667)) +- Fix problems with login function in notebooks by bumping hubble version. ([#672](https://github.com/jina-ai/finetuner/pull/672)) + ### Docs - Add page on loss and pooling to `advanced-topics`. ([#664](https://github.com/jina-ai/finetuner/pull/664)) From dc69b6e0b2fbc4db83050a3af22b6335cf9fa265 Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 09:36:21 +0100 Subject: [PATCH 03/11] chore: bump docarray --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 64c5890cb..3ad0762e4 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ zip_safe=False, setup_requires=['setuptools>=18.0', 'wheel'], install_requires=[ - 'docarray[common]>=0.20.1', + 'docarray[common]>=0.21.0', 'trimesh==3.16.4', 'finetuner-stubs==0.12.4rc13', 'jina-hubble-sdk==0.33.1', From 15c4b9e117e3a9d84fe1f529e71096edf5de42f7 Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 11:14:34 +0100 Subject: [PATCH 04/11] chore: change commons and stubs version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3ad0762e4..8ff936a0f 100644 --- a/setup.py +++ b/setup.py @@ -29,12 +29,12 @@ install_requires=[ 'docarray[common]>=0.21.0', 'trimesh==3.16.4', - 'finetuner-stubs==0.12.4rc13', + 'finetuner-stubs==0.12.5rc1', 'jina-hubble-sdk==0.33.1', ], extras_require={ 'full': [ - 'finetuner-commons==0.12.4rc13', + 'finetuner-commons==0.12.5rc1', ], 'test': [ 'black==22.3.0', From 0346c9538ff850c5e53d8537b96d12e86a91c105 Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 11:44:07 +0100 Subject: [PATCH 05/11] chore: change url of staging environment --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index d6f8b1644..888327ddc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ @pytest.fixture(autouse=True) def overwrite_hubble_registry(): - os.environ['JINA_FINETUNER_REGISTRY'] = 'https://api-staging.finetuner.fit' + os.environ['JINA_FINETUNER_REGISTRY'] = 'https://api.staging.finetuner.fit' os.environ['JINA_HUBBLE_REGISTRY'] = 'https://api.hubble.jina.ai' yield del os.environ['JINA_HUBBLE_REGISTRY'] From 6d28cc2cd1f0845f925f2f5a871a8da67b3c2b6c Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 16:50:48 +0100 Subject: [PATCH 06/11] fix: add slash to url --- finetuner/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finetuner/client/client.py b/finetuner/client/client.py index 0da0b8961..c2c16965c 100644 --- a/finetuner/client/client.py +++ b/finetuner/client/client.py @@ -41,7 +41,7 @@ def create_experiment( :param description: Optional description of the experiment. :return: Created experiment. """ - url = self._construct_url(self._base_url, API_VERSION, EXPERIMENTS) + url = self._construct_url(self._base_url, API_VERSION, EXPERIMENTS) + '/' return self._handle_request( url=url, method=POST, json_data={NAME: name, DESCRIPTION: description} ) From 404a9463c5a5e7d99a7e2787cf6695838c42fce4 Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 17:13:29 +0100 Subject: [PATCH 07/11] fix: experiment delete url --- finetuner/client/client.py | 2 +- tests/unit/test_client.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/finetuner/client/client.py b/finetuner/client/client.py index c2c16965c..9f3644b39 100644 --- a/finetuner/client/client.py +++ b/finetuner/client/client.py @@ -85,7 +85,7 @@ def delete_experiments(self) -> List[dict]: :return: Experiments to be deleted. """ - url = self._construct_url(self._base_url, API_VERSION, EXPERIMENTS) + url = self._construct_url(self._base_url, API_VERSION, EXPERIMENTS) + '/' return self._handle_request(url=url, method=DELETE) """ Run API """ diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index 018736c73..9df804774 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -17,8 +17,12 @@ def test_create_experiment(client_mocker, name='name'): response = client_mocker.create_experiment(name) - assert response['url'] == client_mocker._construct_url( - client_mocker._base_url, API_VERSION, EXPERIMENTS + assert ( + response['url'] + == client_mocker._construct_url( + client_mocker._base_url, API_VERSION, EXPERIMENTS + ) + + '/' ) assert response['method'] == POST assert response['json_data'][NAME] == name From c5e6bdeab2e70fa6de133f9a2cbaef716c03c297 Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 17:15:37 +0100 Subject: [PATCH 08/11] chore: update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ce1e620..dc8320a79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix problems with login function in notebooks by bumping hubble version. ([#672](https://github.com/jina-ai/finetuner/pull/672)) +- Fix URL construction. ([#672](https://github.com/jina-ai/finetuner/pull/672)) + ### Docs - Add page on loss and pooling to `advanced-topics`. ([#664](https://github.com/jina-ai/finetuner/pull/664)) From 9cfb8b4a32488234154bdbcf07066a42e0b69a91 Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 17:32:19 +0100 Subject: [PATCH 09/11] fix: add slash --- tests/unit/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index 9df804774..ea3bb95e6 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -56,7 +56,7 @@ def test_delete_experiments(client_mocker): sent_request = client_mocker.delete_experiments() assert sent_request['url'] == client_mocker._construct_url( client_mocker._base_url, API_VERSION, EXPERIMENTS - ) + ) + '/' assert sent_request['method'] == DELETE From 48f31ae4c93c9aad22208bed4d2b3cc9f3ff591e Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 17:39:56 +0100 Subject: [PATCH 10/11] chore: fix style --- tests/unit/test_client.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index ea3bb95e6..f4cc37cd1 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -54,9 +54,13 @@ def test_delete_experiment(client_mocker, name='name'): def test_delete_experiments(client_mocker): sent_request = client_mocker.delete_experiments() - assert sent_request['url'] == client_mocker._construct_url( - client_mocker._base_url, API_VERSION, EXPERIMENTS - ) + '/' + assert ( + sent_request['url'] + == client_mocker._construct_url( + client_mocker._base_url, API_VERSION, EXPERIMENTS + ) + + '/' + ) assert sent_request['method'] == DELETE From 4b17b7d5d14e26ad20c88c3bde9e2535704b8e5c Mon Sep 17 00:00:00 2001 From: guenthermi Date: Mon, 13 Feb 2023 18:22:27 +0100 Subject: [PATCH 11/11] chore: updated commons and stubs --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8ff936a0f..daa065866 100644 --- a/setup.py +++ b/setup.py @@ -29,12 +29,12 @@ install_requires=[ 'docarray[common]>=0.21.0', 'trimesh==3.16.4', - 'finetuner-stubs==0.12.5rc1', + 'finetuner-stubs==0.12.5', 'jina-hubble-sdk==0.33.1', ], extras_require={ 'full': [ - 'finetuner-commons==0.12.5rc1', + 'finetuner-commons==0.12.5', ], 'test': [ 'black==22.3.0',