Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

chore: bump hubble version #672

Merged
merged 11 commits into from
Feb 14, 2023
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ 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))

- 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))
Expand Down
4 changes: 2 additions & 2 deletions finetuner/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down Expand Up @@ -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 """
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
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.24.0',
'finetuner-stubs==0.12.5',
'jina-hubble-sdk==0.33.1',
],
extras_require={
'full': [
'finetuner-commons==0.12.4rc13',
'finetuner-commons==0.12.5',
],
'test': [
'black==22.3.0',
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
16 changes: 12 additions & 4 deletions tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,8 +54,12 @@ 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

Expand Down