mirror of
https://github.com/clearml/clearml-server
synced 2025-06-26 23:15:47 +00:00
Disable backwards compatibility for 2.13 clients
This commit is contained in:
@@ -5,6 +5,8 @@ from functools import partial
|
||||
from typing import Iterable
|
||||
from unittest import TestCase
|
||||
|
||||
from packaging.version import parse
|
||||
|
||||
from apiserver.tests.api_client import APIClient
|
||||
from apiserver.config_repo import config
|
||||
|
||||
@@ -72,6 +74,7 @@ class TestService(TestCase, TestServiceInterface):
|
||||
def setUp(self, version="1.7"):
|
||||
self._api = APIClient(base_url=f"http://localhost:8008/v{version}")
|
||||
self._deferred = []
|
||||
self._version = parse(version)
|
||||
header(self.id())
|
||||
|
||||
def tearDown(self):
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from copy import deepcopy
|
||||
from typing import Sequence, Optional
|
||||
|
||||
from packaging.version import parse
|
||||
|
||||
from apiserver.tests.automated import TestService
|
||||
|
||||
|
||||
@@ -90,14 +92,15 @@ class TestTaskModels(TestService):
|
||||
):
|
||||
compare_models(task.models.input, input_models)
|
||||
compare_models(task.models.output, output_models)
|
||||
self.assertEqual(
|
||||
get_model_id(task.execution),
|
||||
input_models[0]["model"] if input_models else None,
|
||||
)
|
||||
self.assertEqual(
|
||||
get_model_id(task.output),
|
||||
output_models[-1]["model"] if output_models else None,
|
||||
)
|
||||
if self._version < parse("2.13"):
|
||||
self.assertEqual(
|
||||
get_model_id(task.execution),
|
||||
input_models[0]["model"] if input_models else None,
|
||||
)
|
||||
self.assertEqual(
|
||||
get_model_id(task.output),
|
||||
output_models[-1]["model"] if output_models else None,
|
||||
)
|
||||
|
||||
def new_task(self, **kwargs):
|
||||
self.update_missing(
|
||||
|
||||
Reference in New Issue
Block a user