diff --git a/lightly/openapi_generated/swagger_client/api/collaboration_api.py b/lightly/openapi_generated/swagger_client/api/collaboration_api.py index 2cc360133..d12294c8f 100644 --- a/lightly/openapi_generated/swagger_client/api/collaboration_api.py +++ b/lightly/openapi_generated/swagger_client/api/collaboration_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/datasets_api.py b/lightly/openapi_generated/swagger_client/api/datasets_api.py index be8076609..8c3a39b8b 100644 --- a/lightly/openapi_generated/swagger_client/api/datasets_api.py +++ b/lightly/openapi_generated/swagger_client/api/datasets_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/datasources_api.py b/lightly/openapi_generated/swagger_client/api/datasources_api.py index e21ec5d4f..de0ae11ff 100644 --- a/lightly/openapi_generated/swagger_client/api/datasources_api.py +++ b/lightly/openapi_generated/swagger_client/api/datasources_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictBool, StrictStr, conint, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/docker_api.py b/lightly/openapi_generated/swagger_client/api/docker_api.py index b2ae54ab7..cd5293edb 100644 --- a/lightly/openapi_generated/swagger_client/api/docker_api.py +++ b/lightly/openapi_generated/swagger_client/api/docker_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/embeddings2d_api.py b/lightly/openapi_generated/swagger_client/api/embeddings2d_api.py index 401055db0..f9558050a 100644 --- a/lightly/openapi_generated/swagger_client/api/embeddings2d_api.py +++ b/lightly/openapi_generated/swagger_client/api/embeddings2d_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/embeddings_api.py b/lightly/openapi_generated/swagger_client/api/embeddings_api.py index c38036884..6aba46e63 100644 --- a/lightly/openapi_generated/swagger_client/api/embeddings_api.py +++ b/lightly/openapi_generated/swagger_client/api/embeddings_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictStr, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/jobs_api.py b/lightly/openapi_generated/swagger_client/api/jobs_api.py index a42a4a599..c9c95cf57 100644 --- a/lightly/openapi_generated/swagger_client/api/jobs_api.py +++ b/lightly/openapi_generated/swagger_client/api/jobs_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictStr diff --git a/lightly/openapi_generated/swagger_client/api/mappings_api.py b/lightly/openapi_generated/swagger_client/api/mappings_api.py index 31455414c..99d2851b1 100644 --- a/lightly/openapi_generated/swagger_client/api/mappings_api.py +++ b/lightly/openapi_generated/swagger_client/api/mappings_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictStr, conint, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/meta_data_configurations_api.py b/lightly/openapi_generated/swagger_client/api/meta_data_configurations_api.py index c9f1c055c..f95f311ab 100644 --- a/lightly/openapi_generated/swagger_client/api/meta_data_configurations_api.py +++ b/lightly/openapi_generated/swagger_client/api/meta_data_configurations_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/predictions_api.py b/lightly/openapi_generated/swagger_client/api/predictions_api.py index 23b3674a6..d35c7b96f 100644 --- a/lightly/openapi_generated/swagger_client/api/predictions_api.py +++ b/lightly/openapi_generated/swagger_client/api/predictions_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictBool, conint, conlist, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/quota_api.py b/lightly/openapi_generated/swagger_client/api/quota_api.py index 2fda61dba..53b9cf902 100644 --- a/lightly/openapi_generated/swagger_client/api/quota_api.py +++ b/lightly/openapi_generated/swagger_client/api/quota_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated diff --git a/lightly/openapi_generated/swagger_client/api/samples_api.py b/lightly/openapi_generated/swagger_client/api/samples_api.py index 16f104b24..72b850faf 100644 --- a/lightly/openapi_generated/swagger_client/api/samples_api.py +++ b/lightly/openapi_generated/swagger_client/api/samples_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictBool, StrictStr, conint, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/samplings_api.py b/lightly/openapi_generated/swagger_client/api/samplings_api.py index 41658f741..6fc3cbc3e 100644 --- a/lightly/openapi_generated/swagger_client/api/samplings_api.py +++ b/lightly/openapi_generated/swagger_client/api/samplings_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/scores_api.py b/lightly/openapi_generated/swagger_client/api/scores_api.py index 650b558b8..0f1097de0 100644 --- a/lightly/openapi_generated/swagger_client/api/scores_api.py +++ b/lightly/openapi_generated/swagger_client/api/scores_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, conint, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/tags_api.py b/lightly/openapi_generated/swagger_client/api/tags_api.py index 428c23c98..280173518 100644 --- a/lightly/openapi_generated/swagger_client/api/tags_api.py +++ b/lightly/openapi_generated/swagger_client/api/tags_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/teams_api.py b/lightly/openapi_generated/swagger_client/api/teams_api.py index 7eed9b158..d88a9d4a8 100644 --- a/lightly/openapi_generated/swagger_client/api/teams_api.py +++ b/lightly/openapi_generated/swagger_client/api/teams_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import Field, StrictStr, constr, validator diff --git a/lightly/openapi_generated/swagger_client/api/versioning_api.py b/lightly/openapi_generated/swagger_client/api/versioning_api.py index 908d0d8f3..5f3cca281 100644 --- a/lightly/openapi_generated/swagger_client/api/versioning_api.py +++ b/lightly/openapi_generated/swagger_client/api/versioning_api.py @@ -17,7 +17,12 @@ import io import warnings -from pydantic import validate_arguments, ValidationError +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import validate_arguments, ValidationError +except ImportError: + # Pydantic v1 + from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated from pydantic import StrictStr diff --git a/lightly/openapi_generated/swagger_client/api_response.py b/lightly/openapi_generated/swagger_client/api_response.py index d81c2ff58..16e296f99 100644 --- a/lightly/openapi_generated/swagger_client/api_response.py +++ b/lightly/openapi_generated/swagger_client/api_response.py @@ -2,7 +2,12 @@ from __future__ import annotations from typing import Any, Dict, Optional -from pydantic import Field, StrictInt, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import Field, StrictInt, StrictStr +except ImportError: + # Pydantic v1 + from pydantic import Field, StrictInt, StrictStr class ApiResponse: """ diff --git a/lightly/openapi_generated/swagger_client/models/active_learning_score_create_request.py b/lightly/openapi_generated/swagger_client/models/active_learning_score_create_request.py index 639cc1601..ea29e5c88 100644 --- a/lightly/openapi_generated/swagger_client/models/active_learning_score_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/active_learning_score_create_request.py @@ -20,7 +20,14 @@ from typing import List, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ActiveLearningScoreCreateRequest(BaseModel): """ @@ -42,7 +49,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/active_learning_score_data.py b/lightly/openapi_generated/swagger_client/models/active_learning_score_data.py index 843dd8eeb..229fd8284 100644 --- a/lightly/openapi_generated/swagger_client/models/active_learning_score_data.py +++ b/lightly/openapi_generated/swagger_client/models/active_learning_score_data.py @@ -20,7 +20,14 @@ from typing import List, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ActiveLearningScoreData(BaseModel): """ @@ -59,7 +66,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py b/lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py index 050582f64..66f8703dc 100644 --- a/lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py +++ b/lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ActiveLearningScoreTypesV2Data(BaseModel): """ @@ -67,7 +74,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py b/lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py index 290ddee31..2b159d049 100644 --- a/lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py +++ b/lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py @@ -20,7 +20,14 @@ from typing import List, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ActiveLearningScoreV2Data(BaseModel): """ @@ -68,7 +75,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/annotation_savings.py b/lightly/openapi_generated/swagger_client/models/annotation_savings.py index d7bcc4fb2..a46f38f0d 100644 --- a/lightly/openapi_generated/swagger_client/models/annotation_savings.py +++ b/lightly/openapi_generated/swagger_client/models/annotation_savings.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.task_annotation_savings import TaskAnnotationSavings class AnnotationSavings(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/api_error_code.py b/lightly/openapi_generated/swagger_client/models/api_error_code.py index 6e2b5dd56..fe8a0e719 100644 --- a/lightly/openapi_generated/swagger_client/models/api_error_code.py +++ b/lightly/openapi_generated/swagger_client/models/api_error_code.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ApiErrorCode(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/api_error_response.py b/lightly/openapi_generated/swagger_client/models/api_error_response.py index d845e2814..5ec1020a8 100644 --- a/lightly/openapi_generated/swagger_client/models/api_error_response.py +++ b/lightly/openapi_generated/swagger_client/models/api_error_response.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.api_error_code import ApiErrorCode class ApiErrorResponse(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/async_task_data.py b/lightly/openapi_generated/swagger_client/models/async_task_data.py index 8ee4799a0..efc0fd945 100644 --- a/lightly/openapi_generated/swagger_client/models/async_task_data.py +++ b/lightly/openapi_generated/swagger_client/models/async_task_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class AsyncTaskData(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request.py b/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request.py index cc652c35e..aba653078 100644 --- a/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request.py +++ b/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.auth0_on_sign_up_request_user import Auth0OnSignUpRequestUser class Auth0OnSignUpRequest(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request_user.py b/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request_user.py index d375b9dee..0ed148482 100644 --- a/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request_user.py +++ b/lightly/openapi_generated/swagger_client/models/auth0_on_sign_up_request_user.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class Auth0OnSignUpRequestUser(BaseModel): """ @@ -40,7 +47,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/categorical_distribution.py b/lightly/openapi_generated/swagger_client/models/categorical_distribution.py index 3328bce22..68049dbcc 100644 --- a/lightly/openapi_generated/swagger_client/models/categorical_distribution.py +++ b/lightly/openapi_generated/swagger_client/models/categorical_distribution.py @@ -20,7 +20,14 @@ from typing import Dict -from pydantic import Extra, BaseModel, Field, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.categorical_distribution_metrics import CategoricalDistributionMetrics class CategoricalDistribution(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/categorical_distribution_metrics.py b/lightly/openapi_generated/swagger_client/models/categorical_distribution_metrics.py index bbe41e547..fa79ff0a5 100644 --- a/lightly/openapi_generated/swagger_client/models/categorical_distribution_metrics.py +++ b/lightly/openapi_generated/swagger_client/models/categorical_distribution_metrics.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. class CategoricalDistributionMetrics(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/categorical_distribution_per_set.py b/lightly/openapi_generated/swagger_client/models/categorical_distribution_per_set.py index f94564a9b..3b9b1c4bd 100644 --- a/lightly/openapi_generated/swagger_client/models/categorical_distribution_per_set.py +++ b/lightly/openapi_generated/swagger_client/models/categorical_distribution_per_set.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.categorical_distribution import CategoricalDistribution class CategoricalDistributionPerSet(BaseModel): @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/configuration_data.py b/lightly/openapi_generated/swagger_client/models/configuration_data.py index 76ea89bd3..1882bbb0d 100644 --- a/lightly/openapi_generated/swagger_client/models/configuration_data.py +++ b/lightly/openapi_generated/swagger_client/models/configuration_data.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.configuration_entry import ConfigurationEntry class ConfigurationData(BaseModel): @@ -46,7 +53,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/configuration_entry.py b/lightly/openapi_generated/swagger_client/models/configuration_entry.py index da3a64795..8e41d8f26 100644 --- a/lightly/openapi_generated/swagger_client/models/configuration_entry.py +++ b/lightly/openapi_generated/swagger_client/models/configuration_entry.py @@ -20,7 +20,14 @@ from typing import Any, Optional -from pydantic import Extra, BaseModel, Field, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.configuration_value_data_type import ConfigurationValueDataType class ConfigurationEntry(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/configuration_set_request.py b/lightly/openapi_generated/swagger_client/models/configuration_set_request.py index 07650c154..6d596f15c 100644 --- a/lightly/openapi_generated/swagger_client/models/configuration_set_request.py +++ b/lightly/openapi_generated/swagger_client/models/configuration_set_request.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.configuration_entry import ConfigurationEntry class ConfigurationSetRequest(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/configuration_value_data_type.py b/lightly/openapi_generated/swagger_client/models/configuration_value_data_type.py index 8f7b4a991..628c4a7fb 100644 --- a/lightly/openapi_generated/swagger_client/models/configuration_value_data_type.py +++ b/lightly/openapi_generated/swagger_client/models/configuration_value_data_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ConfigurationValueDataType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/create_cf_bucket_activity_request.py b/lightly/openapi_generated/swagger_client/models/create_cf_bucket_activity_request.py index e397cf8d8..b50d10307 100644 --- a/lightly/openapi_generated/swagger_client/models/create_cf_bucket_activity_request.py +++ b/lightly/openapi_generated/swagger_client/models/create_cf_bucket_activity_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class CreateCFBucketActivityRequest(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/create_docker_worker_registry_entry_request.py b/lightly/openapi_generated/swagger_client/models/create_docker_worker_registry_entry_request.py index f383b057b..e0015cdc8 100644 --- a/lightly/openapi_generated/swagger_client/models/create_docker_worker_registry_entry_request.py +++ b/lightly/openapi_generated/swagger_client/models/create_docker_worker_registry_entry_request.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType @@ -47,7 +54,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/create_entity_response.py b/lightly/openapi_generated/swagger_client/models/create_entity_response.py index d8d4a3da8..7bfe88e55 100644 --- a/lightly/openapi_generated/swagger_client/models/create_entity_response.py +++ b/lightly/openapi_generated/swagger_client/models/create_entity_response.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class CreateEntityResponse(BaseModel): """ @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/create_sample_with_write_urls_response.py b/lightly/openapi_generated/swagger_client/models/create_sample_with_write_urls_response.py index 049d39819..a9ae2b79e 100644 --- a/lightly/openapi_generated/swagger_client/models/create_sample_with_write_urls_response.py +++ b/lightly/openapi_generated/swagger_client/models/create_sample_with_write_urls_response.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sample_write_urls import SampleWriteUrls class CreateSampleWithWriteUrlsResponse(BaseModel): @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/create_team_membership_request.py b/lightly/openapi_generated/swagger_client/models/create_team_membership_request.py index 034cbb707..bb51cd5b3 100644 --- a/lightly/openapi_generated/swagger_client/models/create_team_membership_request.py +++ b/lightly/openapi_generated/swagger_client/models/create_team_membership_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.team_role import TeamRole class CreateTeamMembershipRequest(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/creator.py b/lightly/openapi_generated/swagger_client/models/creator.py index a4177303c..9291b9eb0 100644 --- a/lightly/openapi_generated/swagger_client/models/creator.py +++ b/lightly/openapi_generated/swagger_client/models/creator.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class Creator(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/crop_data.py b/lightly/openapi_generated/swagger_client/models/crop_data.py index 5f0de27f4..d68fbc591 100644 --- a/lightly/openapi_generated/swagger_client/models/crop_data.py +++ b/lightly/openapi_generated/swagger_client/models/crop_data.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, confloat, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class CropData(BaseModel): """ @@ -53,7 +60,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_analysis.py b/lightly/openapi_generated/swagger_client/models/dataset_analysis.py index 88ed53c0a..82c4c1beb 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_analysis.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_analysis.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.embedding_information import EmbeddingInformation from lightly.openapi_generated.swagger_client.models.metadata_information import MetadataInformation @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_create_request.py b/lightly/openapi_generated/swagger_client/models/dataset_create_request.py index 80e858a77..36475f247 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dataset_creator import DatasetCreator from lightly.openapi_generated.swagger_client.models.dataset_type import DatasetType from lightly.openapi_generated.swagger_client.models.image_type import ImageType @@ -58,7 +65,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_creator.py b/lightly/openapi_generated/swagger_client/models/dataset_creator.py index 396c9f8e4..a5c041ad8 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_creator.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_creator.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasetCreator(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/dataset_data.py b/lightly/openapi_generated/swagger_client/models/dataset_data.py index 75063c96a..b01e56f59 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_data.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_data.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dataset_type import DatasetType from lightly.openapi_generated.swagger_client.models.image_type import ImageType from lightly.openapi_generated.swagger_client.models.shared_access_type import SharedAccessType @@ -106,7 +113,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_data_enriched.py b/lightly/openapi_generated/swagger_client/models/dataset_data_enriched.py index ce6e65671..5c834153b 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_data_enriched.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_data_enriched.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dataset_type import DatasetType from lightly.openapi_generated.swagger_client.models.image_type import ImageType from lightly.openapi_generated.swagger_client.models.shared_access_type import SharedAccessType @@ -108,7 +115,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_embedding_data.py b/lightly/openapi_generated/swagger_client/models/dataset_embedding_data.py index 8552bfbb3..b82911b94 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_embedding_data.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_embedding_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasetEmbeddingData(BaseModel): """ @@ -45,7 +52,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_information.py b/lightly/openapi_generated/swagger_client/models/dataset_information.py index af08274c5..16085bc95 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_information.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_information.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dataset_sizes import DatasetSizes class DatasetInformation(BaseModel): @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_sizes.py b/lightly/openapi_generated/swagger_client/models/dataset_sizes.py index 348b0c325..55358b973 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_sizes.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_sizes.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasetSizes(BaseModel): """ @@ -40,7 +47,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dataset_type.py b/lightly/openapi_generated/swagger_client/models/dataset_type.py index 0d4db4d18..65a1f09fa 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_type.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasetType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/dataset_update_request.py b/lightly/openapi_generated/swagger_client/models/dataset_update_request.py index 2df361144..0a6c43661 100644 --- a/lightly/openapi_generated/swagger_client/models/dataset_update_request.py +++ b/lightly/openapi_generated/swagger_client/models/dataset_update_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasetUpdateRequest(BaseModel): """ @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config.py b/lightly/openapi_generated/swagger_client/models/datasource_config.py index 4a2469f8f..11fad25be 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config.py @@ -20,7 +20,14 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_azure import DatasourceConfigAzure from lightly.openapi_generated.swagger_client.models.datasource_config_gcs import DatasourceConfigGCS from lightly.openapi_generated.swagger_client.models.datasource_config_lightly import DatasourceConfigLIGHTLY @@ -29,7 +36,12 @@ from lightly.openapi_generated.swagger_client.models.datasource_config_s3 import DatasourceConfigS3 from lightly.openapi_generated.swagger_client.models.datasource_config_s3_delegated_access import DatasourceConfigS3DelegatedAccess from typing import Any, List -from pydantic import StrictStr, Field, Extra +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import StrictStr, Field +except ImportError: + # Pydantic v1 + from pydantic import StrictStr, Field DATASOURCECONFIG_ONE_OF_SCHEMAS = ["DatasourceConfigAzure", "DatasourceConfigGCS", "DatasourceConfigLIGHTLY", "DatasourceConfigLOCAL", "DatasourceConfigOBS", "DatasourceConfigS3", "DatasourceConfigS3DelegatedAccess"] @@ -57,7 +69,7 @@ class DatasourceConfig(BaseModel): class Config: validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" discriminator_value_class_map = { } diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_azure.py b/lightly/openapi_generated/swagger_client/models/datasource_config_azure.py index 6214b0725..6445bc527 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_azure.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_azure.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase class DatasourceConfigAzure(DatasourceConfigBase): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_azure_all_of.py b/lightly/openapi_generated/swagger_client/models/datasource_config_azure_all_of.py index dc59a9693..807889fb3 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_azure_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_azure_all_of.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceConfigAzureAllOf(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_base.py b/lightly/openapi_generated/swagger_client/models/datasource_config_base.py index 41c71cce3..8772f67a1 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_base.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_base.py @@ -21,7 +21,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_purpose import DatasourcePurpose class DatasourceConfigBase(BaseModel): @@ -49,7 +56,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" # JSON field name that stores the object type __discriminator_property_name = 'type' diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_base_full_path.py b/lightly/openapi_generated/swagger_client/models/datasource_config_base_full_path.py index eace63453..9bf6d2cbe 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_base_full_path.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_base_full_path.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceConfigBaseFullPath(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_gcs.py b/lightly/openapi_generated/swagger_client/models/datasource_config_gcs.py index d9b150eb6..1acaf93dd 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_gcs.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_gcs.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase class DatasourceConfigGCS(DatasourceConfigBase): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_gcs_all_of.py b/lightly/openapi_generated/swagger_client/models/datasource_config_gcs_all_of.py index 580e33f04..212413393 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_gcs_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_gcs_all_of.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceConfigGCSAllOf(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_lightly.py b/lightly/openapi_generated/swagger_client/models/datasource_config_lightly.py index 2617eae53..1d1790b7d 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_lightly.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_lightly.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase class DatasourceConfigLIGHTLY(DatasourceConfigBase): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_local.py b/lightly/openapi_generated/swagger_client/models/datasource_config_local.py index e2f819723..f36485f5a 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_local.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_local.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase class DatasourceConfigLOCAL(DatasourceConfigBase): @@ -46,7 +53,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_local_all_of.py b/lightly/openapi_generated/swagger_client/models/datasource_config_local_all_of.py index 247074c37..4dbf68f85 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_local_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_local_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceConfigLOCALAllOf(BaseModel): """ @@ -45,7 +52,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_obs.py b/lightly/openapi_generated/swagger_client/models/datasource_config_obs.py index f50bab55b..0261ebece 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_obs.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_obs.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase class DatasourceConfigOBS(DatasourceConfigBase): @@ -45,7 +52,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_obs_all_of.py b/lightly/openapi_generated/swagger_client/models/datasource_config_obs_all_of.py index 9209302d8..7f9655668 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_obs_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_obs_all_of.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceConfigOBSAllOf(BaseModel): """ @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_s3.py b/lightly/openapi_generated/swagger_client/models/datasource_config_s3.py index 638018727..f4426d5f6 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_s3.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_s3.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase from lightly.openapi_generated.swagger_client.models.s3_region import S3Region @@ -50,7 +57,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_s3_all_of.py b/lightly/openapi_generated/swagger_client/models/datasource_config_s3_all_of.py index 3e5dbd40f..6ec2f4671 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_s3_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_s3_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.s3_region import S3Region class DatasourceConfigS3AllOf(BaseModel): @@ -48,7 +55,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access.py b/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access.py index 6a875353c..66b794d29 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase from lightly.openapi_generated.swagger_client.models.s3_region import S3Region @@ -64,7 +71,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access_all_of.py b/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access_all_of.py index 7d5df74f1..bbc9e7b68 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_s3_delegated_access_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.s3_region import S3Region class DatasourceConfigS3DelegatedAccessAllOf(BaseModel): @@ -62,7 +69,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data.py b/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data.py index ae8e14b80..d8b60c4cd 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_config_verify_data_errors import DatasourceConfigVerifyDataErrors class DatasourceConfigVerifyData(BaseModel): @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data_errors.py b/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data_errors.py index 03737f6f3..f73a83191 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data_errors.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_config_verify_data_errors.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceConfigVerifyDataErrors(BaseModel): """ @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_request.py b/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_request.py index b7cb2f090..75c29264a 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_request.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceProcessedUntilTimestampRequest(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_response.py b/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_response.py index d228893a2..6d43a2da1 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_response.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_processed_until_timestamp_response.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceProcessedUntilTimestampResponse(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_purpose.py b/lightly/openapi_generated/swagger_client/models/datasource_purpose.py index 3b609a096..7bebd0d2c 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_purpose.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_purpose.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourcePurpose(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data.py b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data.py index a5642f0af..9d8ab0346 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_data_row import DatasourceRawSamplesDataRow class DatasourceRawSamplesData(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data_row.py b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data_row.py index 13edc4f5d..c90412a37 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data_row.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_data_row.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceRawSamplesDataRow(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data.py b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data.py index 628adf561..a3ce1c914 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_metadata_data_row import DatasourceRawSamplesMetadataDataRow class DatasourceRawSamplesMetadataData(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data_row.py b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data_row.py index dd885748e..94ebf18bd 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data_row.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_metadata_data_row.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceRawSamplesMetadataDataRow(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data.py b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data.py index bdad551ed..577fd6b5e 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_predictions_data_row import DatasourceRawSamplesPredictionsDataRow class DatasourceRawSamplesPredictionsData(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data_row.py b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data_row.py index 8e2abb75b..7c67f3ea1 100644 --- a/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data_row.py +++ b/lightly/openapi_generated/swagger_client/models/datasource_raw_samples_predictions_data_row.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DatasourceRawSamplesPredictionsDataRow(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/delegated_access_external_ids_inner.py b/lightly/openapi_generated/swagger_client/models/delegated_access_external_ids_inner.py index cb6e1d887..f560cd1f9 100644 --- a/lightly/openapi_generated/swagger_client/models/delegated_access_external_ids_inner.py +++ b/lightly/openapi_generated/swagger_client/models/delegated_access_external_ids_inner.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DelegatedAccessExternalIdsInner(BaseModel): """ @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/detection_frame_prediction.py b/lightly/openapi_generated/swagger_client/models/detection_frame_prediction.py index 1dd6b4915..27ff28a6e 100644 --- a/lightly/openapi_generated/swagger_client/models/detection_frame_prediction.py +++ b/lightly/openapi_generated/swagger_client/models/detection_frame_prediction.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.object_detection_prediction import ObjectDetectionPrediction class DetectionFramePrediction(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/detection_task_information.py b/lightly/openapi_generated/swagger_client/models/detection_task_information.py index c2b5fa30d..9cd1769a6 100644 --- a/lightly/openapi_generated/swagger_client/models/detection_task_information.py +++ b/lightly/openapi_generated/swagger_client/models/detection_task_information.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.detection_frame_prediction import DetectionFramePrediction from lightly.openapi_generated.swagger_client.models.embedding_information import EmbeddingInformation @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/dimensionality_reduction_method.py b/lightly/openapi_generated/swagger_client/models/dimensionality_reduction_method.py index 64947045f..95e79e177 100644 --- a/lightly/openapi_generated/swagger_client/models/dimensionality_reduction_method.py +++ b/lightly/openapi_generated/swagger_client/models/dimensionality_reduction_method.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DimensionalityReductionMethod(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_authorization_request.py b/lightly/openapi_generated/swagger_client/models/docker_authorization_request.py index eb6fa33c2..45890e324 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_authorization_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_authorization_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_task_description import DockerTaskDescription class DockerAuthorizationRequest(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_authorization_response.py b/lightly/openapi_generated/swagger_client/models/docker_authorization_response.py index ab552b088..66b32ec2c 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_authorization_response.py +++ b/lightly/openapi_generated/swagger_client/models/docker_authorization_response.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerAuthorizationResponse(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_license_information.py b/lightly/openapi_generated/swagger_client/models/docker_license_information.py index 6a1ad8419..e053529e0 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_license_information.py +++ b/lightly/openapi_generated/swagger_client/models/docker_license_information.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerLicenseInformation(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_create_request.py index 42af83ee0..7613a165c 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_artifact_storage_location import DockerRunArtifactStorageLocation from lightly.openapi_generated.swagger_client.models.docker_run_artifact_type import DockerRunArtifactType @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_created_data.py b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_created_data.py index bde23167a..18e6c363a 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_created_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_created_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunArtifactCreatedData(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_data.py b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_data.py index 1a92f6ee6..b0265de39 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_artifact_storage_location import DockerRunArtifactStorageLocation from lightly.openapi_generated.swagger_client.models.docker_run_artifact_type import DockerRunArtifactType @@ -47,7 +54,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_storage_location.py b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_storage_location.py index 02c2f7cb9..032d52679 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_storage_location.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_storage_location.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunArtifactStorageLocation(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_type.py b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_type.py index 02d827c70..0e8be6662 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_artifact_type.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_artifact_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunArtifactType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_run_create_request.py index 819ac6f3a..5e3c38673 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator class DockerRunCreateRequest(BaseModel): @@ -70,7 +77,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_data.py b/lightly/openapi_generated/swagger_client/models/docker_run_data.py index 5502a6a2c..6e70e3eb0 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_data.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_artifact_data import DockerRunArtifactData from lightly.openapi_generated.swagger_client.models.docker_run_state import DockerRunState @@ -84,7 +91,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_log_create_entry_data.py b/lightly/openapi_generated/swagger_client/models/docker_run_log_create_entry_data.py index dd4fddd09..dc8b87a4b 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_log_create_entry_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_log_create_entry_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_log_docker_load import DockerRunLogDockerLoad from lightly.openapi_generated.swagger_client.models.docker_run_log_level import DockerRunLogLevel from lightly.openapi_generated.swagger_client.models.docker_run_state import DockerRunState @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_log_data.py b/lightly/openapi_generated/swagger_client/models/docker_run_log_data.py index b950012fd..0ce131862 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_log_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_log_data.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_log_entry_data import DockerRunLogEntryData class DockerRunLogData(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_log_docker_load.py b/lightly/openapi_generated/swagger_client/models/docker_run_log_docker_load.py index 9610d5994..eeb0e7d23 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_log_docker_load.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_log_docker_load.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunLogDockerLoad(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data.py b/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data.py index 6d0c025a0..679d97a9a 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_log_docker_load import DockerRunLogDockerLoad from lightly.openapi_generated.swagger_client.models.docker_run_log_level import DockerRunLogLevel from lightly.openapi_generated.swagger_client.models.docker_run_state import DockerRunState @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data_base.py b/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data_base.py index 1f76b4f65..e7297c9f6 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data_base.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_log_entry_data_base.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_log_docker_load import DockerRunLogDockerLoad from lightly.openapi_generated.swagger_client.models.docker_run_log_level import DockerRunLogLevel from lightly.openapi_generated.swagger_client.models.docker_run_state import DockerRunState @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_log_level.py b/lightly/openapi_generated/swagger_client/models/docker_run_log_level.py index 5ce445d15..bdedd3074 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_log_level.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_log_level.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunLogLevel(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_create_request.py index d7b9bbae8..ec19626f4 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_create_request.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_priority import DockerRunScheduledPriority @@ -46,7 +53,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_data.py b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_data.py index f6d3fcb91..98b3d145e 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_data.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_priority import DockerRunScheduledPriority from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_state import DockerRunScheduledState @@ -76,7 +83,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_priority.py b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_priority.py index 8f59946a2..28ee58607 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_priority.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_priority.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunScheduledPriority(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_state.py b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_state.py index cd7e2abbf..c2650084b 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_state.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_state.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunScheduledState(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_update_request.py b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_update_request.py index 020d715f6..dfcebdbd1 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_update_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_scheduled_update_request.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_priority import DockerRunScheduledPriority from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_state import DockerRunScheduledState @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_state.py b/lightly/openapi_generated/swagger_client/models/docker_run_state.py index bcc781651..ac784ddbf 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_state.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_state.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerRunState(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_run_update_request.py b/lightly/openapi_generated/swagger_client/models/docker_run_update_request.py index f0adb6197..19ce43df0 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_run_update_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_run_update_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_run_state import DockerRunState class DockerRunUpdateRequest(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_task_description.py b/lightly/openapi_generated/swagger_client/models/docker_task_description.py index c24b3eaa3..9f030bd31 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_task_description.py +++ b/lightly/openapi_generated/swagger_client/models/docker_task_description.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, StrictStr, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sampling_config import SamplingConfig from lightly.openapi_generated.swagger_client.models.sampling_method import SamplingMethod @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_user_stats.py b/lightly/openapi_generated/swagger_client/models/docker_user_stats.py index 424f9b9be..573782172 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_user_stats.py +++ b/lightly/openapi_generated/swagger_client/models/docker_user_stats.py @@ -20,7 +20,14 @@ from typing import Any, Dict -from pydantic import Extra, BaseModel, Field, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerUserStats(BaseModel): """ @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_authorization_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_authorization_request.py index 35c99fc5b..b87a0c105 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_authorization_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_authorization_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerAuthorizationRequest(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config.py index ecd36cabe..e55e971d2 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType from lightly.openapi_generated.swagger_client.models.selection_config import SelectionConfig @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_create_request.py index d870fffa4..b3b8c540a 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator from lightly.openapi_generated.swagger_client.models.docker_worker_config import DockerWorkerConfig @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request.py index c67a7b5ff..95d65764a 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_omni_vx_create_request_base import DockerWorkerConfigOmniVXCreateRequestBase from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2 import DockerWorkerConfigV2 @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request_all_of.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request_all_of.py index 444754607..f8a31f1c9 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v2_create_request_all_of.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2 import DockerWorkerConfigV2 class DockerWorkerConfigOmniV2CreateRequestAllOf(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request.py index dcda1ca4e..91dc10452 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_omni_vx_create_request_base import DockerWorkerConfigOmniVXCreateRequestBase from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3 @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request_all_of.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request_all_of.py index 8d6f62f53..35c1d63c0 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v3_create_request_all_of.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3 class DockerWorkerConfigOmniV3CreateRequestAllOf(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request.py index c8ca135f6..2a373e9f2 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_omni_vx_create_request_base import DockerWorkerConfigOmniVXCreateRequestBase from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4 import DockerWorkerConfigV4 @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request_all_of.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request_all_of.py index 950fef7cd..d562c4fb4 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_v4_create_request_all_of.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4 import DockerWorkerConfigV4 class DockerWorkerConfigOmniV4CreateRequestAllOf(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request.py index 01303511b..edf23ac03 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request.py @@ -20,12 +20,24 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_omni_v2_create_request import DockerWorkerConfigOmniV2CreateRequest from lightly.openapi_generated.swagger_client.models.docker_worker_config_omni_v3_create_request import DockerWorkerConfigOmniV3CreateRequest from lightly.openapi_generated.swagger_client.models.docker_worker_config_omni_v4_create_request import DockerWorkerConfigOmniV4CreateRequest from typing import Any, List -from pydantic import StrictStr, Field, Extra +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import StrictStr, Field +except ImportError: + # Pydantic v1 + from pydantic import StrictStr, Field DOCKERWORKERCONFIGOMNIVXCREATEREQUEST_ONE_OF_SCHEMAS = ["DockerWorkerConfigOmniV2CreateRequest", "DockerWorkerConfigOmniV3CreateRequest", "DockerWorkerConfigOmniV4CreateRequest"] @@ -45,7 +57,7 @@ class DockerWorkerConfigOmniVXCreateRequest(BaseModel): class Config: validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" discriminator_value_class_map = { } diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request_base.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request_base.py index 1b415353e..1c4e243f2 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request_base.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_omni_vx_create_request_base.py @@ -21,7 +21,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator class DockerWorkerConfigOmniVXCreateRequestBase(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" # JSON field name that stores the object type __discriminator_property_name = 'version' diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data.py index 25d9dfcd2..e23eac654 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config import DockerWorkerConfig from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data_base import DockerWorkerConfigVXDataBase @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data_all_of.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data_all_of.py index d81a7e7fa..3f53688fd 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v0_data_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config import DockerWorkerConfig class DockerWorkerConfigV0DataAllOf(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2.py index fae09fe66..73c6059f4 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker import DockerWorkerConfigV2Docker from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly import DockerWorkerConfigV2Lightly from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_create_request.py index ad2036832..3b08dddf7 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2 import DockerWorkerConfigV2 @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data.py index 577246f58..e2bc57798 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2 import DockerWorkerConfigV2 from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data_base import DockerWorkerConfigVXDataBase @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data_all_of.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data_all_of.py index 310fe125c..7eb255587 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_data_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2 import DockerWorkerConfigV2 class DockerWorkerConfigV2DataAllOf(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker.py index a51d7b892..88c192c2b 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker_datasource import DockerWorkerConfigV2DockerDatasource from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker_object_level import DockerWorkerConfigV2DockerObjectLevel from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker_stopping_condition import DockerWorkerConfigV2DockerStoppingCondition @@ -53,7 +60,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_datasource.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_datasource.py index df8f8fb14..a716dcc46 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_datasource.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_datasource.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV2DockerDatasource(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_object_level.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_object_level.py index 75057dc4f..3858b428a 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_object_level.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_object_level.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV2DockerObjectLevel(BaseModel): """ @@ -56,7 +63,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_stopping_condition.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_stopping_condition.py index c79cc5ed2..d45bb0c3f 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_stopping_condition.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_docker_stopping_condition.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV2DockerStoppingCondition(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly.py index a37201475..65c8e47cc 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_collate import DockerWorkerConfigV2LightlyCollate from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_model import DockerWorkerConfigV2LightlyModel from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_trainer import DockerWorkerConfigV2LightlyTrainer @@ -45,7 +52,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_collate.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_collate.py index 0a3b20140..3e8545b61 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_collate.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_collate.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV2LightlyCollate(BaseModel): """ @@ -47,7 +54,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_model.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_model.py index eec232631..95c7ae3da 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_model.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_model.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.lightly_model_v2 import LightlyModelV2 class DockerWorkerConfigV2LightlyModel(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_trainer.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_trainer.py index 7ae82b634..873c954b6 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_trainer.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v2_lightly_trainer.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.lightly_trainer_precision_v2 import LightlyTrainerPrecisionV2 class DockerWorkerConfigV2LightlyTrainer(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3.py index 4e5d1d8db..40e161f39 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker import DockerWorkerConfigV3Docker from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly import DockerWorkerConfigV3Lightly from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_create_request.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_create_request.py index 4891c3fca..851913f15 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3 @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data.py index ea8bc7e57..96e6bfedd 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3 from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data_base import DockerWorkerConfigVXDataBase @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data_all_of.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data_all_of.py index e75f69be3..e54c03012 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_data_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3 class DockerWorkerConfigV3DataAllOf(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_datasource_input_expiration.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_datasource_input_expiration.py index 3cb45c3dd..ddc7d92f2 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_datasource_input_expiration.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_datasource_input_expiration.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.expiry_handling_strategy_v3 import ExpiryHandlingStrategyV3 class DockerWorkerConfigV3DatasourceInputExpiration(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py index 7a66eab2e..c820bb494 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_corruptness_check import DockerWorkerConfigV3DockerCorruptnessCheck from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource import DockerWorkerConfigV3DockerDatasource from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_training import DockerWorkerConfigV3DockerTraining @@ -63,7 +70,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_corruptness_check.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_corruptness_check.py index 5aeac4eb9..c909bf09f 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_corruptness_check.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_corruptness_check.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV3DockerCorruptnessCheck(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_datasource.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_datasource.py index 28b425e3b..692ad0246 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_datasource.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_datasource.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_datasource_input_expiration import DockerWorkerConfigV3DatasourceInputExpiration class DockerWorkerConfigV3DockerDatasource(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_training.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_training.py index e52cdb2ff..943e5e4b8 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_training.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker_training.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV3DockerTraining(BaseModel): """ @@ -44,7 +51,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly.py index d6859f466..55d4794e9 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_checkpoint_callback import DockerWorkerConfigV3LightlyCheckpointCallback from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_collate import DockerWorkerConfigV3LightlyCollate from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_criterion import DockerWorkerConfigV3LightlyCriterion @@ -48,7 +55,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_checkpoint_callback.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_checkpoint_callback.py index 1260ae5e6..6cd421c20 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_checkpoint_callback.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_checkpoint_callback.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV3LightlyCheckpointCallback(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_collate.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_collate.py index e75f4d394..8230a8881 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_collate.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_collate.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV3LightlyCollate(BaseModel): """ @@ -48,7 +55,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_criterion.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_criterion.py index 99e909834..6a2735ccd 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_criterion.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_criterion.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV3LightlyCriterion(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_loader.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_loader.py index 99e3fcdb1..ff0604b61 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_loader.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_loader.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV3LightlyLoader(BaseModel): """ @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_model.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_model.py index a63807186..9973f9caf 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_model.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_model.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.lightly_model_v3 import LightlyModelV3 class DockerWorkerConfigV3LightlyModel(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_optimizer.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_optimizer.py index e3ead37ff..1d8210591 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_optimizer.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_optimizer.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigV3LightlyOptimizer(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_trainer.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_trainer.py index 5cf388cef..d5959c9ee 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_trainer.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_lightly_trainer.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.lightly_trainer_precision_v3 import LightlyTrainerPrecisionV3 class DockerWorkerConfigV3LightlyTrainer(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4.py index 678612140..780c90f81 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly import DockerWorkerConfigV3Lightly from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_docker import DockerWorkerConfigV4Docker from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data.py index faa7fe8be..73dade7c5 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4 import DockerWorkerConfigV4 from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data_base import DockerWorkerConfigVXDataBase @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data_all_of.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data_all_of.py index 34a47fb43..0e6a660a9 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_data_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4 import DockerWorkerConfigV4 class DockerWorkerConfigV4DataAllOf(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_docker.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_docker.py index b1d5d55ec..0c659e465 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_docker.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v4_docker.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_corruptness_check import DockerWorkerConfigV3DockerCorruptnessCheck from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource import DockerWorkerConfigV3DockerDatasource from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_training import DockerWorkerConfigV3DockerTraining @@ -65,7 +72,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data.py index 3ce6fdf9b..79d93136f 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data.py @@ -20,13 +20,25 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_config_v0_data import DockerWorkerConfigV0Data from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_data import DockerWorkerConfigV2Data from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_data import DockerWorkerConfigV3Data from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_data import DockerWorkerConfigV4Data from typing import Any, List -from pydantic import StrictStr, Field, Extra +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import StrictStr, Field +except ImportError: + # Pydantic v1 + from pydantic import StrictStr, Field DOCKERWORKERCONFIGVXDATA_ONE_OF_SCHEMAS = ["DockerWorkerConfigV0Data", "DockerWorkerConfigV2Data", "DockerWorkerConfigV3Data", "DockerWorkerConfigV4Data"] @@ -48,7 +60,7 @@ class DockerWorkerConfigVXData(BaseModel): class Config: validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" discriminator_value_class_map = { } diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data_base.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data_base.py index dc6d97396..8d46298bc 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data_base.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data_base.py @@ -21,7 +21,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerConfigVXDataBase(BaseModel): """ @@ -44,7 +51,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" # JSON field name that stores the object type __discriminator_property_name = 'version' diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_registry_entry_data.py b/lightly/openapi_generated/swagger_client/models/docker_worker_registry_entry_data.py index 54861d933..4e6dcc0aa 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_registry_entry_data.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_registry_entry_data.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_state import DockerWorkerState from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType @@ -59,7 +66,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_state.py b/lightly/openapi_generated/swagger_client/models/docker_worker_state.py index 9e00e2e21..0f4516c46 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_state.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_state.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerState(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_type.py b/lightly/openapi_generated/swagger_client/models/docker_worker_type.py index ea6b6464a..737e318ea 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_type.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class DockerWorkerType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/embedding2d_create_request.py b/lightly/openapi_generated/swagger_client/models/embedding2d_create_request.py index 7b15bd32d..ac8cc7ec2 100644 --- a/lightly/openapi_generated/swagger_client/models/embedding2d_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/embedding2d_create_request.py @@ -20,7 +20,14 @@ from typing import List, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dimensionality_reduction_method import DimensionalityReductionMethod class Embedding2dCreateRequest(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/embedding2d_data.py b/lightly/openapi_generated/swagger_client/models/embedding2d_data.py index 0b2e490c7..a6b22136f 100644 --- a/lightly/openapi_generated/swagger_client/models/embedding2d_data.py +++ b/lightly/openapi_generated/swagger_client/models/embedding2d_data.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dimensionality_reduction_method import DimensionalityReductionMethod class Embedding2dData(BaseModel): @@ -63,7 +70,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/embedding_data.py b/lightly/openapi_generated/swagger_client/models/embedding_data.py index df06a7403..9bec0a5c2 100644 --- a/lightly/openapi_generated/swagger_client/models/embedding_data.py +++ b/lightly/openapi_generated/swagger_client/models/embedding_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class EmbeddingData(BaseModel): """ @@ -50,7 +57,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/embedding_data2_d.py b/lightly/openapi_generated/swagger_client/models/embedding_data2_d.py index e097a3f3d..e10d56760 100644 --- a/lightly/openapi_generated/swagger_client/models/embedding_data2_d.py +++ b/lightly/openapi_generated/swagger_client/models/embedding_data2_d.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.scatter_plot_example_image import ScatterPlotExampleImage class EmbeddingData2D(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/embedding_information.py b/lightly/openapi_generated/swagger_client/models/embedding_information.py index cf3c1f0b6..5ba3d1f34 100644 --- a/lightly/openapi_generated/swagger_client/models/embedding_information.py +++ b/lightly/openapi_generated/swagger_client/models/embedding_information.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.numeric_distribution_per_set import NumericDistributionPerSet from lightly.openapi_generated.swagger_client.models.scatter_plot_data import ScatterPlotData @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/expiry_handling_strategy_v3.py b/lightly/openapi_generated/swagger_client/models/expiry_handling_strategy_v3.py index 6fcb9315f..b42d1a481 100644 --- a/lightly/openapi_generated/swagger_client/models/expiry_handling_strategy_v3.py +++ b/lightly/openapi_generated/swagger_client/models/expiry_handling_strategy_v3.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ExpiryHandlingStrategyV3(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/file_name_format.py b/lightly/openapi_generated/swagger_client/models/file_name_format.py index 801a325ca..13c2e7de7 100644 --- a/lightly/openapi_generated/swagger_client/models/file_name_format.py +++ b/lightly/openapi_generated/swagger_client/models/file_name_format.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class FileNameFormat(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/file_output_format.py b/lightly/openapi_generated/swagger_client/models/file_output_format.py index 7d1706f6d..4e172d3c3 100644 --- a/lightly/openapi_generated/swagger_client/models/file_output_format.py +++ b/lightly/openapi_generated/swagger_client/models/file_output_format.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class FileOutputFormat(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/filename_and_read_url.py b/lightly/openapi_generated/swagger_client/models/filename_and_read_url.py index fc5af48c5..aef61b503 100644 --- a/lightly/openapi_generated/swagger_client/models/filename_and_read_url.py +++ b/lightly/openapi_generated/swagger_client/models/filename_and_read_url.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class FilenameAndReadUrl(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/general_information.py b/lightly/openapi_generated/swagger_client/models/general_information.py index dced0fd80..cc36d66b5 100644 --- a/lightly/openapi_generated/swagger_client/models/general_information.py +++ b/lightly/openapi_generated/swagger_client/models/general_information.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.annotation_savings import AnnotationSavings from lightly.openapi_generated.swagger_client.models.dataset_information import DatasetInformation from lightly.openapi_generated.swagger_client.models.run_information import RunInformation @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/image_type.py b/lightly/openapi_generated/swagger_client/models/image_type.py index 7d68fe9e5..a9375c9a6 100644 --- a/lightly/openapi_generated/swagger_client/models/image_type.py +++ b/lightly/openapi_generated/swagger_client/models/image_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ImageType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/initial_tag_create_request.py b/lightly/openapi_generated/swagger_client/models/initial_tag_create_request.py index f202af5d4..75b015013 100644 --- a/lightly/openapi_generated/swagger_client/models/initial_tag_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/initial_tag_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.image_type import ImageType from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator @@ -59,7 +66,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/internal_debug_latency.py b/lightly/openapi_generated/swagger_client/models/internal_debug_latency.py index ef3a4a931..4404c9918 100644 --- a/lightly/openapi_generated/swagger_client/models/internal_debug_latency.py +++ b/lightly/openapi_generated/swagger_client/models/internal_debug_latency.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.internal_debug_latency_mongodb import InternalDebugLatencyMongodb class InternalDebugLatency(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/internal_debug_latency_mongodb.py b/lightly/openapi_generated/swagger_client/models/internal_debug_latency_mongodb.py index 77a189be7..76a8a3200 100644 --- a/lightly/openapi_generated/swagger_client/models/internal_debug_latency_mongodb.py +++ b/lightly/openapi_generated/swagger_client/models/internal_debug_latency_mongodb.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. class InternalDebugLatencyMongodb(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/job_result_type.py b/lightly/openapi_generated/swagger_client/models/job_result_type.py index 94685e4f3..942eade21 100644 --- a/lightly/openapi_generated/swagger_client/models/job_result_type.py +++ b/lightly/openapi_generated/swagger_client/models/job_result_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class JobResultType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/job_state.py b/lightly/openapi_generated/swagger_client/models/job_state.py index 98fe3198d..11f30199e 100644 --- a/lightly/openapi_generated/swagger_client/models/job_state.py +++ b/lightly/openapi_generated/swagger_client/models/job_state.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class JobState(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/job_status_data.py b/lightly/openapi_generated/swagger_client/models/job_status_data.py index f24d50c88..08d34d998 100644 --- a/lightly/openapi_generated/swagger_client/models/job_status_data.py +++ b/lightly/openapi_generated/swagger_client/models/job_status_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictInt, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.job_state import JobState from lightly.openapi_generated.swagger_client.models.job_status_data_result import JobStatusDataResult from lightly.openapi_generated.swagger_client.models.job_status_meta import JobStatusMeta @@ -63,7 +70,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/job_status_data_result.py b/lightly/openapi_generated/swagger_client/models/job_status_data_result.py index cc19fb35c..650b0dab5 100644 --- a/lightly/openapi_generated/swagger_client/models/job_status_data_result.py +++ b/lightly/openapi_generated/swagger_client/models/job_status_data_result.py @@ -20,7 +20,14 @@ from typing import Any, Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.job_result_type import JobResultType class JobStatusDataResult(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/job_status_meta.py b/lightly/openapi_generated/swagger_client/models/job_status_meta.py index 4256f0f80..fa612dbcf 100644 --- a/lightly/openapi_generated/swagger_client/models/job_status_meta.py +++ b/lightly/openapi_generated/swagger_client/models/job_status_meta.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictBool, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictBool, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.job_status_upload_method import JobStatusUploadMethod class JobStatusMeta(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/job_status_upload_method.py b/lightly/openapi_generated/swagger_client/models/job_status_upload_method.py index 64a42eb50..5cfadd8a9 100644 --- a/lightly/openapi_generated/swagger_client/models/job_status_upload_method.py +++ b/lightly/openapi_generated/swagger_client/models/job_status_upload_method.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class JobStatusUploadMethod(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/jobs_data.py b/lightly/openapi_generated/swagger_client/models/jobs_data.py index b01a65e4f..2bd05b8e2 100644 --- a/lightly/openapi_generated/swagger_client/models/jobs_data.py +++ b/lightly/openapi_generated/swagger_client/models/jobs_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.job_result_type import JobResultType from lightly.openapi_generated.swagger_client.models.job_state import JobState @@ -59,7 +66,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/label_box_data_row.py b/lightly/openapi_generated/swagger_client/models/label_box_data_row.py index e483fa829..56b0c95cc 100644 --- a/lightly/openapi_generated/swagger_client/models/label_box_data_row.py +++ b/lightly/openapi_generated/swagger_client/models/label_box_data_row.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class LabelBoxDataRow(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/label_box_v4_data_row.py b/lightly/openapi_generated/swagger_client/models/label_box_v4_data_row.py index 17e401e2c..952e23b10 100644 --- a/lightly/openapi_generated/swagger_client/models/label_box_v4_data_row.py +++ b/lightly/openapi_generated/swagger_client/models/label_box_v4_data_row.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class LabelBoxV4DataRow(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/label_studio_task.py b/lightly/openapi_generated/swagger_client/models/label_studio_task.py index cb2718094..a5dee7cb2 100644 --- a/lightly/openapi_generated/swagger_client/models/label_studio_task.py +++ b/lightly/openapi_generated/swagger_client/models/label_studio_task.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.label_studio_task_data import LabelStudioTaskData class LabelStudioTask(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/label_studio_task_data.py b/lightly/openapi_generated/swagger_client/models/label_studio_task_data.py index f4e2f5d71..be231ca47 100644 --- a/lightly/openapi_generated/swagger_client/models/label_studio_task_data.py +++ b/lightly/openapi_generated/swagger_client/models/label_studio_task_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sample_data import SampleData class LabelStudioTaskData(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/lightly_docker_selection_method.py b/lightly/openapi_generated/swagger_client/models/lightly_docker_selection_method.py index 19d319550..ba976a1ea 100644 --- a/lightly/openapi_generated/swagger_client/models/lightly_docker_selection_method.py +++ b/lightly/openapi_generated/swagger_client/models/lightly_docker_selection_method.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class LightlyDockerSelectionMethod(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/lightly_model_v2.py b/lightly/openapi_generated/swagger_client/models/lightly_model_v2.py index f713c9aea..c7f53fe16 100644 --- a/lightly/openapi_generated/swagger_client/models/lightly_model_v2.py +++ b/lightly/openapi_generated/swagger_client/models/lightly_model_v2.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class LightlyModelV2(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/lightly_model_v3.py b/lightly/openapi_generated/swagger_client/models/lightly_model_v3.py index d557f1b8b..6d2c02e28 100644 --- a/lightly/openapi_generated/swagger_client/models/lightly_model_v3.py +++ b/lightly/openapi_generated/swagger_client/models/lightly_model_v3.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class LightlyModelV3(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v2.py b/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v2.py index 01f965caa..dc51dd931 100644 --- a/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v2.py +++ b/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v2.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class LightlyTrainerPrecisionV2(int, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v3.py b/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v3.py index 65f8a652d..3a2b58553 100644 --- a/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v3.py +++ b/lightly/openapi_generated/swagger_client/models/lightly_trainer_precision_v3.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class LightlyTrainerPrecisionV3(int, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/metadata_information.py b/lightly/openapi_generated/swagger_client/models/metadata_information.py index d002c16ed..356cc7b60 100644 --- a/lightly/openapi_generated/swagger_client/models/metadata_information.py +++ b/lightly/openapi_generated/swagger_client/models/metadata_information.py @@ -20,7 +20,14 @@ from typing import Dict -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.categorical_distribution_per_set import CategoricalDistributionPerSet from lightly.openapi_generated.swagger_client.models.numeric_distribution_per_set import NumericDistributionPerSet @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/numeric_distribution.py b/lightly/openapi_generated/swagger_client/models/numeric_distribution.py index d30dc80a5..415b1031e 100644 --- a/lightly/openapi_generated/swagger_client/models/numeric_distribution.py +++ b/lightly/openapi_generated/swagger_client/models/numeric_distribution.py @@ -20,7 +20,14 @@ from typing import List, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.numeric_distribution_metrics import NumericDistributionMetrics class NumericDistribution(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/numeric_distribution_metrics.py b/lightly/openapi_generated/swagger_client/models/numeric_distribution_metrics.py index e94e03849..c57bd07fe 100644 --- a/lightly/openapi_generated/swagger_client/models/numeric_distribution_metrics.py +++ b/lightly/openapi_generated/swagger_client/models/numeric_distribution_metrics.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class NumericDistributionMetrics(BaseModel): """ @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/numeric_distribution_per_set.py b/lightly/openapi_generated/swagger_client/models/numeric_distribution_per_set.py index cc177f456..c8fcec1ff 100644 --- a/lightly/openapi_generated/swagger_client/models/numeric_distribution_per_set.py +++ b/lightly/openapi_generated/swagger_client/models/numeric_distribution_per_set.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.numeric_distribution import NumericDistribution class NumericDistributionPerSet(BaseModel): @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/object_detection_prediction.py b/lightly/openapi_generated/swagger_client/models/object_detection_prediction.py index 49f677830..0fd1288e4 100644 --- a/lightly/openapi_generated/swagger_client/models/object_detection_prediction.py +++ b/lightly/openapi_generated/swagger_client/models/object_detection_prediction.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ObjectDetectionPrediction(BaseModel): """ @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton.py index 078fb4740..b8b3dcc98 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton.py @@ -20,14 +20,26 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_singleton_classification import PredictionSingletonClassification from lightly.openapi_generated.swagger_client.models.prediction_singleton_instance_segmentation import PredictionSingletonInstanceSegmentation from lightly.openapi_generated.swagger_client.models.prediction_singleton_keypoint_detection import PredictionSingletonKeypointDetection from lightly.openapi_generated.swagger_client.models.prediction_singleton_object_detection import PredictionSingletonObjectDetection from lightly.openapi_generated.swagger_client.models.prediction_singleton_semantic_segmentation import PredictionSingletonSemanticSegmentation from typing import Any, List -from pydantic import StrictStr, Field, Extra +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import StrictStr, Field +except ImportError: + # Pydantic v1 + from pydantic import StrictStr, Field PREDICTIONSINGLETON_ONE_OF_SCHEMAS = ["PredictionSingletonClassification", "PredictionSingletonInstanceSegmentation", "PredictionSingletonKeypointDetection", "PredictionSingletonObjectDetection", "PredictionSingletonSemanticSegmentation"] @@ -51,7 +63,7 @@ class PredictionSingleton(BaseModel): class Config: validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" discriminator_value_class_map = { } diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_base.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_base.py index 668c1280c..32cbf7891 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_base.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_base.py @@ -21,7 +21,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictStr, confloat, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, confloat, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, confloat, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionSingletonBase(BaseModel): """ @@ -67,7 +74,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" # JSON field name that stores the object type __discriminator_property_name = 'type' diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification.py index 5b2757c75..eccda2cdd 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_singleton_base import PredictionSingletonBase class PredictionSingletonClassification(PredictionSingletonBase): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification_all_of.py index 3e8bbeeaf..60a8952ec 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_classification_all_of.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionSingletonClassificationAllOf(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation.py index 76f93d537..e116ef5eb 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_singleton_base import PredictionSingletonBase class PredictionSingletonInstanceSegmentation(PredictionSingletonBase): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation_all_of.py index 9cb8faf4a..6f20350da 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation_all_of.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionSingletonInstanceSegmentationAllOf(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py index be66eae4a..ca1dcc1e6 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_singleton_base import PredictionSingletonBase class PredictionSingletonKeypointDetection(PredictionSingletonBase): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py index d5cfa8795..af8933a14 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionSingletonKeypointDetectionAllOf(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection.py index bff2c8d22..26e8c6009 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_singleton_base import PredictionSingletonBase class PredictionSingletonObjectDetection(PredictionSingletonBase): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection_all_of.py index 24fb056b2..a4a8fc7eb 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_object_detection_all_of.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionSingletonObjectDetectionAllOf(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation.py index ef595d400..135bf4f4b 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_singleton_base import PredictionSingletonBase class PredictionSingletonSemanticSegmentation(PredictionSingletonBase): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation_all_of.py index cdbff3b3c..2d0992b06 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_semantic_segmentation_all_of.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionSingletonSemanticSegmentationAllOf(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_information.py b/lightly/openapi_generated/swagger_client/models/prediction_task_information.py index ebfc742c3..1d3b2fcd9 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_information.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_information.py @@ -20,7 +20,14 @@ from typing import Dict, Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.categorical_distribution_per_set import CategoricalDistributionPerSet from lightly.openapi_generated.swagger_client.models.detection_task_information import DetectionTaskInformation from lightly.openapi_generated.swagger_client.models.numeric_distribution_per_set import NumericDistributionPerSet @@ -44,7 +51,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema.py index 469dcd4da..a13246f3b 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema.py @@ -20,11 +20,23 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_task_schema_keypoint import PredictionTaskSchemaKeypoint from lightly.openapi_generated.swagger_client.models.prediction_task_schema_simple import PredictionTaskSchemaSimple from typing import Any, List -from pydantic import StrictStr, Field, Extra +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import StrictStr, Field +except ImportError: + # Pydantic v1 + from pydantic import StrictStr, Field PREDICTIONTASKSCHEMA_ONE_OF_SCHEMAS = ["PredictionTaskSchemaKeypoint", "PredictionTaskSchemaSimple"] @@ -42,7 +54,7 @@ class PredictionTaskSchema(BaseModel): class Config: validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" discriminator_value_class_map = { } diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_base.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_base.py index d16f60906..a6b307e7a 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_base.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_base.py @@ -21,7 +21,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionTaskSchemaBase(BaseModel): """ @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" # JSON field name that stores the object type __discriminator_property_name = 'type' diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category.py index 505a8b7e1..c5c7e1d8d 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, conint, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionTaskSchemaCategory(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints.py index e0d9a71fa..af7e72509 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, conint, conlist, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionTaskSchemaCategoryKeypoints(BaseModel): """ @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints_all_of.py index 4dba76568..7017590db 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_category_keypoints_all_of.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, conint, conlist, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class PredictionTaskSchemaCategoryKeypointsAllOf(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint.py index 612d9677d..c946df83d 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_task_schema_base import PredictionTaskSchemaBase from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category_keypoints import PredictionTaskSchemaCategoryKeypoints @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint_all_of.py index 155c79b4e..8908c45a6 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_keypoint_all_of.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category_keypoints import PredictionTaskSchemaCategoryKeypoints class PredictionTaskSchemaKeypointAllOf(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple.py index 45aee273e..14c96468b 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_task_schema_base import PredictionTaskSchemaBase from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category import PredictionTaskSchemaCategory @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple_all_of.py index 9616f4fff..79d79b36e 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schema_simple_all_of.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category import PredictionTaskSchemaCategory class PredictionTaskSchemaSimpleAllOf(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/prediction_task_schemas.py b/lightly/openapi_generated/swagger_client/models/prediction_task_schemas.py index bbdef7dee..bfa447420 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_task_schemas.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_task_schemas.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.prediction_task_schema import PredictionTaskSchema class PredictionTaskSchemas(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/profile_basic_data.py b/lightly/openapi_generated/swagger_client/models/profile_basic_data.py index 295988dd2..e85073619 100644 --- a/lightly/openapi_generated/swagger_client/models/profile_basic_data.py +++ b/lightly/openapi_generated/swagger_client/models/profile_basic_data.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.team_basic_data import TeamBasicData class ProfileBasicData(BaseModel): @@ -42,7 +49,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/profile_me_data.py b/lightly/openapi_generated/swagger_client/models/profile_me_data.py index 60715f113..af0aca86d 100644 --- a/lightly/openapi_generated/swagger_client/models/profile_me_data.py +++ b/lightly/openapi_generated/swagger_client/models/profile_me_data.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.profile_me_data_settings import ProfileMeDataSettings from lightly.openapi_generated.swagger_client.models.team_basic_data import TeamBasicData from lightly.openapi_generated.swagger_client.models.user_type import UserType @@ -48,7 +55,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/profile_me_data_settings.py b/lightly/openapi_generated/swagger_client/models/profile_me_data_settings.py index 25d1cff0e..e4e8bb630 100644 --- a/lightly/openapi_generated/swagger_client/models/profile_me_data_settings.py +++ b/lightly/openapi_generated/swagger_client/models/profile_me_data_settings.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ProfileMeDataSettings(BaseModel): """ @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/questionnaire_data.py b/lightly/openapi_generated/swagger_client/models/questionnaire_data.py index 52182805e..8da69e5b5 100644 --- a/lightly/openapi_generated/swagger_client/models/questionnaire_data.py +++ b/lightly/openapi_generated/swagger_client/models/questionnaire_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sector import Sector class QuestionnaireData(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/report_v2.py b/lightly/openapi_generated/swagger_client/models/report_v2.py index b87758ce3..47ec4e77a 100644 --- a/lightly/openapi_generated/swagger_client/models/report_v2.py +++ b/lightly/openapi_generated/swagger_client/models/report_v2.py @@ -20,7 +20,14 @@ from typing import Dict, Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dataset_analysis import DatasetAnalysis from lightly.openapi_generated.swagger_client.models.general_information import GeneralInformation from lightly.openapi_generated.swagger_client.models.prediction_task_information import PredictionTaskInformation @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/run_information.py b/lightly/openapi_generated/swagger_client/models/run_information.py index 85fd67344..e75620d03 100644 --- a/lightly/openapi_generated/swagger_client/models/run_information.py +++ b/lightly/openapi_generated/swagger_client/models/run_information.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class RunInformation(BaseModel): """ @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/s3_region.py b/lightly/openapi_generated/swagger_client/models/s3_region.py index bc056b475..8e2032aed 100644 --- a/lightly/openapi_generated/swagger_client/models/s3_region.py +++ b/lightly/openapi_generated/swagger_client/models/s3_region.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class S3Region(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/sama_task.py b/lightly/openapi_generated/swagger_client/models/sama_task.py index 2cc767742..14cc67408 100644 --- a/lightly/openapi_generated/swagger_client/models/sama_task.py +++ b/lightly/openapi_generated/swagger_client/models/sama_task.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sama_task_data import SamaTaskData class SamaTask(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sama_task_data.py b/lightly/openapi_generated/swagger_client/models/sama_task_data.py index 781fd1b34..c22b8b21e 100644 --- a/lightly/openapi_generated/swagger_client/models/sama_task_data.py +++ b/lightly/openapi_generated/swagger_client/models/sama_task_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictInt, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SamaTaskData(BaseModel): """ @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sample_create_request.py b/lightly/openapi_generated/swagger_client/models/sample_create_request.py index 3c292a76a..6ca75b592 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/sample_create_request.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.crop_data import CropData from lightly.openapi_generated.swagger_client.models.sample_meta_data import SampleMetaData from lightly.openapi_generated.swagger_client.models.video_frame_data import VideoFrameData @@ -43,7 +50,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sample_data.py b/lightly/openapi_generated/swagger_client/models/sample_data.py index 84d3c39fb..51e4e886a 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_data.py +++ b/lightly/openapi_generated/swagger_client/models/sample_data.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.crop_data import CropData from lightly.openapi_generated.swagger_client.models.sample_meta_data import SampleMetaData from lightly.openapi_generated.swagger_client.models.sample_type import SampleType @@ -67,7 +74,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sample_data_modes.py b/lightly/openapi_generated/swagger_client/models/sample_data_modes.py index 736754e2e..86256a98a 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_data_modes.py +++ b/lightly/openapi_generated/swagger_client/models/sample_data_modes.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.crop_data import CropData from lightly.openapi_generated.swagger_client.models.sample_meta_data import SampleMetaData from lightly.openapi_generated.swagger_client.models.sample_type import SampleType @@ -67,7 +74,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sample_meta_data.py b/lightly/openapi_generated/swagger_client/models/sample_meta_data.py index 2153a9487..1e9f65dfa 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_meta_data.py +++ b/lightly/openapi_generated/swagger_client/models/sample_meta_data.py @@ -20,7 +20,14 @@ from typing import Any, Dict, List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SampleMetaData(BaseModel): """ @@ -45,7 +52,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sample_partial_mode.py b/lightly/openapi_generated/swagger_client/models/sample_partial_mode.py index 65574d616..fefe8cd0f 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_partial_mode.py +++ b/lightly/openapi_generated/swagger_client/models/sample_partial_mode.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SamplePartialMode(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/sample_sort_by.py b/lightly/openapi_generated/swagger_client/models/sample_sort_by.py index 4ead865e5..e2fb31dbf 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_sort_by.py +++ b/lightly/openapi_generated/swagger_client/models/sample_sort_by.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SampleSortBy(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/sample_type.py b/lightly/openapi_generated/swagger_client/models/sample_type.py index 8b31e0739..30825f7f5 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_type.py +++ b/lightly/openapi_generated/swagger_client/models/sample_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SampleType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/sample_update_request.py b/lightly/openapi_generated/swagger_client/models/sample_update_request.py index 7aa1a199b..b558d58f3 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_update_request.py +++ b/lightly/openapi_generated/swagger_client/models/sample_update_request.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sample_meta_data import SampleMetaData class SampleUpdateRequest(BaseModel): @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sample_write_urls.py b/lightly/openapi_generated/swagger_client/models/sample_write_urls.py index 73435bcba..b32cdf733 100644 --- a/lightly/openapi_generated/swagger_client/models/sample_write_urls.py +++ b/lightly/openapi_generated/swagger_client/models/sample_write_urls.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SampleWriteUrls(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sampling_config.py b/lightly/openapi_generated/swagger_client/models/sampling_config.py index 8a837226e..628126c52 100644 --- a/lightly/openapi_generated/swagger_client/models/sampling_config.py +++ b/lightly/openapi_generated/swagger_client/models/sampling_config.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sampling_config_stopping_condition import SamplingConfigStoppingCondition class SamplingConfig(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sampling_config_stopping_condition.py b/lightly/openapi_generated/swagger_client/models/sampling_config_stopping_condition.py index 2a560883a..c9671d2d3 100644 --- a/lightly/openapi_generated/swagger_client/models/sampling_config_stopping_condition.py +++ b/lightly/openapi_generated/swagger_client/models/sampling_config_stopping_condition.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SamplingConfigStoppingCondition(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sampling_create_request.py b/lightly/openapi_generated/swagger_client/models/sampling_create_request.py index 5f2ef5648..14b41fc3d 100644 --- a/lightly/openapi_generated/swagger_client/models/sampling_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/sampling_create_request.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.sampling_config import SamplingConfig from lightly.openapi_generated.swagger_client.models.sampling_method import SamplingMethod @@ -79,7 +86,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sampling_method.py b/lightly/openapi_generated/swagger_client/models/sampling_method.py index 9bdef6708..7f8e1b15c 100644 --- a/lightly/openapi_generated/swagger_client/models/sampling_method.py +++ b/lightly/openapi_generated/swagger_client/models/sampling_method.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SamplingMethod(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/scatter_plot_data.py b/lightly/openapi_generated/swagger_client/models/scatter_plot_data.py index 78b352b40..ea1ec2ade 100644 --- a/lightly/openapi_generated/swagger_client/models/scatter_plot_data.py +++ b/lightly/openapi_generated/swagger_client/models/scatter_plot_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.embedding_data2_d import EmbeddingData2D class ScatterPlotData(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/scatter_plot_example_image.py b/lightly/openapi_generated/swagger_client/models/scatter_plot_example_image.py index d520c2528..ba40f0dd6 100644 --- a/lightly/openapi_generated/swagger_client/models/scatter_plot_example_image.py +++ b/lightly/openapi_generated/swagger_client/models/scatter_plot_example_image.py @@ -20,7 +20,14 @@ from typing import List, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ScatterPlotExampleImage(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/sector.py b/lightly/openapi_generated/swagger_client/models/sector.py index b9e0cfa80..d2f09f9ad 100644 --- a/lightly/openapi_generated/swagger_client/models/sector.py +++ b/lightly/openapi_generated/swagger_client/models/sector.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class Sector(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/selected_and_removed_image_pair.py b/lightly/openapi_generated/swagger_client/models/selected_and_removed_image_pair.py index 43864dfa3..b352482df 100644 --- a/lightly/openapi_generated/swagger_client/models/selected_and_removed_image_pair.py +++ b/lightly/openapi_generated/swagger_client/models/selected_and_removed_image_pair.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectedAndRemovedImagePair(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config.py b/lightly/openapi_generated/swagger_client/models/selection_config.py index bfdc07ed0..ee9e75db5 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_entry import SelectionConfigEntry class SelectionConfig(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_all_of.py b/lightly/openapi_generated/swagger_client/models/selection_config_all_of.py index 3d04824fa..b1163eb18 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_all_of.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_entry import SelectionConfigEntry class SelectionConfigAllOf(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_base.py b/lightly/openapi_generated/swagger_client/models/selection_config_base.py index 51b358cf1..b85f601cf 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_base.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_base.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectionConfigBase(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_entry.py b/lightly/openapi_generated/swagger_client/models/selection_config_entry.py index 973d438f3..36411a2e3 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_entry.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_entry.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_entry_input import SelectionConfigEntryInput from lightly.openapi_generated.swagger_client.models.selection_config_entry_strategy import SelectionConfigEntryStrategy @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_entry_input.py b/lightly/openapi_generated/swagger_client/models/selection_config_entry_input.py index 65cf32e69..cf99e2dd5 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_entry_input.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_entry_input.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_input_predictions_name import SelectionInputPredictionsName from lightly.openapi_generated.swagger_client.models.selection_input_type import SelectionInputType @@ -84,7 +91,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py b/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py index 67bf84527..333dfc514 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation from lightly.openapi_generated.swagger_client.models.selection_strategy_type import SelectionStrategyType @@ -40,7 +47,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3.py index 80aed78fb..22afe37af 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry import SelectionConfigV3Entry class SelectionConfigV3(BaseModel): @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_all_of.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_all_of.py index 84770bdd9..aa86615c1 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_all_of.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry import SelectionConfigV3Entry class SelectionConfigV3AllOf(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry.py index 834cbd317..3da94669d 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_input import SelectionConfigV3EntryInput from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy import SelectionConfigV3EntryStrategy @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_input.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_input.py index 539a0e7be..aad439725 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_input.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_input.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_input_predictions_name import SelectionInputPredictionsName from lightly.openapi_generated.swagger_client.models.selection_input_type import SelectionInputType @@ -84,7 +91,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py index 54df3a933..ef3b8ad8d 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of_target_range import SelectionConfigV3EntryStrategyAllOfTargetRange from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 @@ -46,7 +53,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py index 781cb2db7..7be5eccd4 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of_target_range import SelectionConfigV3EntryStrategyAllOfTargetRange from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of_target_range.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of_target_range.py index 73495ae9c..5e1e3dacd 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of_target_range.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of_target_range.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectionConfigV3EntryStrategyAllOfTargetRange(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v4.py b/lightly/openapi_generated/swagger_client/models/selection_config_v4.py index 75ecb7e82..7b101e478 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v4.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v4.py @@ -20,7 +20,14 @@ from typing import List, Optional, Union -from pydantic import Extra, BaseModel, Field, confloat, conint, conlist, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v4_entry import SelectionConfigV4Entry class SelectionConfigV4(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v4_all_of.py b/lightly/openapi_generated/swagger_client/models/selection_config_v4_all_of.py index 2081502e6..c2c498ec6 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v4_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v4_all_of.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, conlist, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conlist, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v4_entry import SelectionConfigV4Entry class SelectionConfigV4AllOf(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry.py b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry.py index b2d584866..718d5c395 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v4_entry_input import SelectionConfigV4EntryInput from lightly.openapi_generated.swagger_client.models.selection_config_v4_entry_strategy import SelectionConfigV4EntryStrategy @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_input.py b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_input.py index e7770d3f9..da48ff17d 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_input.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_input.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_input_predictions_name import SelectionInputPredictionsName from lightly.openapi_generated.swagger_client.models.selection_input_type import SelectionInputType @@ -84,7 +91,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy.py b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy.py index 460d042e3..4f415712f 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr, confloat, conint, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, confloat, conint, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, confloat, conint, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of_target_range import SelectionConfigV3EntryStrategyAllOfTargetRange from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 @@ -57,7 +64,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy_all_of.py b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy_all_of.py index e99b60b4a..c8c0bf718 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v4_entry_strategy_all_of.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 class SelectionConfigV4EntryStrategyAllOf(BaseModel): @@ -46,7 +53,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/selection_input_predictions_name.py b/lightly/openapi_generated/swagger_client/models/selection_input_predictions_name.py index b7864f0b3..b5be5bcad 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_input_predictions_name.py +++ b/lightly/openapi_generated/swagger_client/models/selection_input_predictions_name.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectionInputPredictionsName(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/selection_input_type.py b/lightly/openapi_generated/swagger_client/models/selection_input_type.py index cbbfa6841..322797c32 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_input_type.py +++ b/lightly/openapi_generated/swagger_client/models/selection_input_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectionInputType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/selection_strategy_threshold_operation.py b/lightly/openapi_generated/swagger_client/models/selection_strategy_threshold_operation.py index e416e2f5f..a07260917 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_strategy_threshold_operation.py +++ b/lightly/openapi_generated/swagger_client/models/selection_strategy_threshold_operation.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectionStrategyThresholdOperation(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/selection_strategy_type.py b/lightly/openapi_generated/swagger_client/models/selection_strategy_type.py index 686f2054b..b4c38ce53 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_strategy_type.py +++ b/lightly/openapi_generated/swagger_client/models/selection_strategy_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectionStrategyType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py b/lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py index 4d1984560..1454b6af1 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py +++ b/lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SelectionStrategyTypeV3(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/service_account_basic_data.py b/lightly/openapi_generated/swagger_client/models/service_account_basic_data.py index 9b89aebe2..0837133f3 100644 --- a/lightly/openapi_generated/swagger_client/models/service_account_basic_data.py +++ b/lightly/openapi_generated/swagger_client/models/service_account_basic_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, conint, constr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, constr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class ServiceAccountBasicData(BaseModel): """ @@ -37,7 +44,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/set_embeddings_is_processed_flag_by_id_body_request.py b/lightly/openapi_generated/swagger_client/models/set_embeddings_is_processed_flag_by_id_body_request.py index 84990149b..3d94ee669 100644 --- a/lightly/openapi_generated/swagger_client/models/set_embeddings_is_processed_flag_by_id_body_request.py +++ b/lightly/openapi_generated/swagger_client/models/set_embeddings_is_processed_flag_by_id_body_request.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SetEmbeddingsIsProcessedFlagByIdBodyRequest(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/shared_access_config_create_request.py b/lightly/openapi_generated/swagger_client/models/shared_access_config_create_request.py index 1cec404a1..4730bbf79 100644 --- a/lightly/openapi_generated/swagger_client/models/shared_access_config_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/shared_access_config_create_request.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictStr, conlist +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conlist + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.creator import Creator from lightly.openapi_generated.swagger_client.models.shared_access_type import SharedAccessType @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/shared_access_config_data.py b/lightly/openapi_generated/swagger_client/models/shared_access_config_data.py index 8c393fef7..476251696 100644 --- a/lightly/openapi_generated/swagger_client/models/shared_access_config_data.py +++ b/lightly/openapi_generated/swagger_client/models/shared_access_config_data.py @@ -20,7 +20,14 @@ from typing import List -from pydantic import Extra, BaseModel, Field, StrictStr, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.shared_access_type import SharedAccessType class SharedAccessConfigData(BaseModel): @@ -48,7 +55,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/shared_access_type.py b/lightly/openapi_generated/swagger_client/models/shared_access_type.py index 42416f2c2..22dc14b1a 100644 --- a/lightly/openapi_generated/swagger_client/models/shared_access_type.py +++ b/lightly/openapi_generated/swagger_client/models/shared_access_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class SharedAccessType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/tag_active_learning_scores_data.py b/lightly/openapi_generated/swagger_client/models/tag_active_learning_scores_data.py index 96d7b3a23..eae651741 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_active_learning_scores_data.py +++ b/lightly/openapi_generated/swagger_client/models/tag_active_learning_scores_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagActiveLearningScoresData(BaseModel): """ @@ -58,7 +65,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_arithmetics_operation.py b/lightly/openapi_generated/swagger_client/models/tag_arithmetics_operation.py index 491303003..b0eb51a80 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_arithmetics_operation.py +++ b/lightly/openapi_generated/swagger_client/models/tag_arithmetics_operation.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagArithmeticsOperation(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/tag_arithmetics_request.py b/lightly/openapi_generated/swagger_client/models/tag_arithmetics_request.py index e40238101..35e870295 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_arithmetics_request.py +++ b/lightly/openapi_generated/swagger_client/models/tag_arithmetics_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_arithmetics_operation import TagArithmeticsOperation from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator @@ -75,7 +82,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_arithmetics_response.py b/lightly/openapi_generated/swagger_client/models/tag_arithmetics_response.py index 21070676a..bb36c53b6 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_arithmetics_response.py +++ b/lightly/openapi_generated/swagger_client/models/tag_arithmetics_response.py @@ -20,11 +20,23 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, ValidationError, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.create_entity_response import CreateEntityResponse from lightly.openapi_generated.swagger_client.models.tag_bit_mask_response import TagBitMaskResponse from typing import Any, List -from pydantic import StrictStr, Field, Extra +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import StrictStr, Field +except ImportError: + # Pydantic v1 + from pydantic import StrictStr, Field TAGARITHMETICSRESPONSE_ONE_OF_SCHEMAS = ["CreateEntityResponse", "TagBitMaskResponse"] @@ -42,7 +54,7 @@ class TagArithmeticsResponse(BaseModel): class Config: validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def __init__(self, *args, **kwargs): if args: diff --git a/lightly/openapi_generated/swagger_client/models/tag_bit_mask_response.py b/lightly/openapi_generated/swagger_client/models/tag_bit_mask_response.py index e24a5e8af..e7757d758 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_bit_mask_response.py +++ b/lightly/openapi_generated/swagger_client/models/tag_bit_mask_response.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagBitMaskResponse(BaseModel): """ @@ -41,7 +48,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data.py b/lightly/openapi_generated/swagger_client/models/tag_change_data.py index 863f30ec9..b2cf51647 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_data_arithmetics import TagChangeDataArithmetics from lightly.openapi_generated.swagger_client.models.tag_change_data_initial import TagChangeDataInitial from lightly.openapi_generated.swagger_client.models.tag_change_data_metadata import TagChangeDataMetadata @@ -50,7 +57,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_arithmetics.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_arithmetics.py index db2a7fc3e..976eb93df 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_arithmetics.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_arithmetics.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagChangeDataArithmetics(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_initial.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_initial.py index 4a109787a..c8a0d803f 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_initial.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_initial.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagChangeDataInitial(BaseModel): """ @@ -44,7 +51,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_metadata.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_metadata.py index 676893f11..11d90bd92 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_metadata.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_metadata.py @@ -20,7 +20,14 @@ from typing import Any, Dict, Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_data_operation_method import TagChangeDataOperationMethod class TagChangeDataMetadata(BaseModel): @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_operation_method.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_operation_method.py index 6a20dc2f0..70af22034 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_operation_method.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_operation_method.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagChangeDataOperationMethod(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_rename.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_rename.py index 864c50769..b13c6a783 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_rename.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_rename.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagChangeDataRename(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_sampler.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_sampler.py index 405f0ead1..9ab6acfe8 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_sampler.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_sampler.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagChangeDataSampler(BaseModel): """ @@ -34,7 +41,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_samples.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_samples.py index 2ef45e798..6505abbd6 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_samples.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_samples.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_data_operation_method import TagChangeDataOperationMethod class TagChangeDataSamples(BaseModel): @@ -38,7 +45,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_scatterplot.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_scatterplot.py index 102409e93..df08eeaac 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_scatterplot.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_scatterplot.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictStr, confloat, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, confloat, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_data_operation_method import TagChangeDataOperationMethod class TagChangeDataScatterplot(BaseModel): @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_data_upsize.py b/lightly/openapi_generated/swagger_client/models/tag_change_data_upsize.py index 951266ae2..18a3ecf7a 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_data_upsize.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_data_upsize.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagChangeDataUpsize(BaseModel): """ @@ -46,7 +53,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_change_entry.py b/lightly/openapi_generated/swagger_client/models/tag_change_entry.py index a84181b4b..cdbe345ff 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_change_entry.py +++ b/lightly/openapi_generated/swagger_client/models/tag_change_entry.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, conint +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_data import TagChangeData from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator @@ -39,7 +46,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_create_request.py b/lightly/openapi_generated/swagger_client/models/tag_create_request.py index d95e9f739..c76929071 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_create_request.py +++ b/lightly/openapi_generated/swagger_client/models/tag_create_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictInt, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_data import TagChangeData from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator @@ -95,7 +102,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_creator.py b/lightly/openapi_generated/swagger_client/models/tag_creator.py index 91d84d8f2..42f39c441 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_creator.py +++ b/lightly/openapi_generated/swagger_client/models/tag_creator.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TagCreator(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/tag_data.py b/lightly/openapi_generated/swagger_client/models/tag_data.py index be48c1995..130385982 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_data.py +++ b/lightly/openapi_generated/swagger_client/models/tag_data.py @@ -20,7 +20,14 @@ from typing import List, Optional -from pydantic import Extra, BaseModel, Field, StrictInt, conint, conlist, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictInt, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictInt, conint, conlist, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_entry import TagChangeEntry class TagData(BaseModel): @@ -114,7 +121,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_update_request.py b/lightly/openapi_generated/swagger_client/models/tag_update_request.py index bafe031b4..b33072920 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_update_request.py +++ b/lightly/openapi_generated/swagger_client/models/tag_update_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_change_data import TagChangeData from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator @@ -56,7 +63,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/tag_upsize_request.py b/lightly/openapi_generated/swagger_client/models/tag_upsize_request.py index d5c294d78..b5963b73e 100644 --- a/lightly/openapi_generated/swagger_client/models/tag_upsize_request.py +++ b/lightly/openapi_generated/swagger_client/models/tag_upsize_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator class TagUpsizeRequest(BaseModel): @@ -54,7 +61,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/task_annotation_savings.py b/lightly/openapi_generated/swagger_client/models/task_annotation_savings.py index f0f1f6073..7d3ae52a0 100644 --- a/lightly/openapi_generated/swagger_client/models/task_annotation_savings.py +++ b/lightly/openapi_generated/swagger_client/models/task_annotation_savings.py @@ -20,7 +20,14 @@ from typing import Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TaskAnnotationSavings(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/task_type.py b/lightly/openapi_generated/swagger_client/models/task_type.py index 9a645473f..a87375745 100644 --- a/lightly/openapi_generated/swagger_client/models/task_type.py +++ b/lightly/openapi_generated/swagger_client/models/task_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TaskType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/team_basic_data.py b/lightly/openapi_generated/swagger_client/models/team_basic_data.py index 13bdfa2c3..35ba7b82c 100644 --- a/lightly/openapi_generated/swagger_client/models/team_basic_data.py +++ b/lightly/openapi_generated/swagger_client/models/team_basic_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.team_role import TeamRole class TeamBasicData(BaseModel): @@ -44,7 +51,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/team_data.py b/lightly/openapi_generated/swagger_client/models/team_data.py index 346245050..792658a79 100644 --- a/lightly/openapi_generated/swagger_client/models/team_data.py +++ b/lightly/openapi_generated/swagger_client/models/team_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr, conint, constr, validator +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr, conint, constr, validator + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TeamData(BaseModel): """ @@ -44,7 +51,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/team_role.py b/lightly/openapi_generated/swagger_client/models/team_role.py index 47a073695..9216b1d80 100644 --- a/lightly/openapi_generated/swagger_client/models/team_role.py +++ b/lightly/openapi_generated/swagger_client/models/team_role.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class TeamRole(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/trigger2d_embedding_job_request.py b/lightly/openapi_generated/swagger_client/models/trigger2d_embedding_job_request.py index ed534fd31..322a722b1 100644 --- a/lightly/openapi_generated/swagger_client/models/trigger2d_embedding_job_request.py +++ b/lightly/openapi_generated/swagger_client/models/trigger2d_embedding_job_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.dimensionality_reduction_method import DimensionalityReductionMethod class Trigger2dEmbeddingJobRequest(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/update_docker_worker_registry_entry_request.py b/lightly/openapi_generated/swagger_client/models/update_docker_worker_registry_entry_request.py index 4db776513..241a9267e 100644 --- a/lightly/openapi_generated/swagger_client/models/update_docker_worker_registry_entry_request.py +++ b/lightly/openapi_generated/swagger_client/models/update_docker_worker_registry_entry_request.py @@ -20,7 +20,14 @@ from typing import Optional -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.docker_worker_state import DockerWorkerState class UpdateDockerWorkerRegistryEntryRequest(BaseModel): @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/update_team_membership_request.py b/lightly/openapi_generated/swagger_client/models/update_team_membership_request.py index d5a65559f..52e81ed37 100644 --- a/lightly/openapi_generated/swagger_client/models/update_team_membership_request.py +++ b/lightly/openapi_generated/swagger_client/models/update_team_membership_request.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field + pass # Add pass to avoid empty try/except if no imports are generated for this file. from lightly.openapi_generated.swagger_client.models.team_role import TeamRole class UpdateTeamMembershipRequest(BaseModel): @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/user_type.py b/lightly/openapi_generated/swagger_client/models/user_type.py index ff333fa72..b5202d0a5 100644 --- a/lightly/openapi_generated/swagger_client/models/user_type.py +++ b/lightly/openapi_generated/swagger_client/models/user_type.py @@ -20,7 +20,14 @@ from aenum import no_arg # type: ignore - +try: + # Pydantic >=v1.10.17 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + + pass # Add pass to avoid empty try/except if no imports are generated for this file. class UserType(str, Enum): diff --git a/lightly/openapi_generated/swagger_client/models/video_frame_data.py b/lightly/openapi_generated/swagger_client/models/video_frame_data.py index d2d4a0f8b..af49050e9 100644 --- a/lightly/openapi_generated/swagger_client/models/video_frame_data.py +++ b/lightly/openapi_generated/swagger_client/models/video_frame_data.py @@ -20,7 +20,14 @@ from typing import Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class VideoFrameData(BaseModel): """ @@ -36,7 +43,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/worker_information.py b/lightly/openapi_generated/swagger_client/models/worker_information.py index a4130b5c8..9f8094fc8 100644 --- a/lightly/openapi_generated/swagger_client/models/worker_information.py +++ b/lightly/openapi_generated/swagger_client/models/worker_information.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class WorkerInformation(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/lightly/openapi_generated/swagger_client/models/write_csv_url_data.py b/lightly/openapi_generated/swagger_client/models/write_csv_url_data.py index aee3a1d43..98b300303 100644 --- a/lightly/openapi_generated/swagger_client/models/write_csv_url_data.py +++ b/lightly/openapi_generated/swagger_client/models/write_csv_url_data.py @@ -20,7 +20,14 @@ -from pydantic import Extra, BaseModel, Field, StrictStr +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. +except ImportError: + # Pydantic v1 + from pydantic import BaseModel, Field, StrictStr + pass # Add pass to avoid empty try/except if no imports are generated for this file. class WriteCSVUrlData(BaseModel): """ @@ -35,7 +42,7 @@ class Config: allow_population_by_field_name = True validate_assignment = True use_enum_values = True - extra = Extra.forbid + extra = "forbid" def to_str(self, by_alias: bool = False) -> str: """Returns the string representation of the model""" diff --git a/pyproject.toml b/pyproject.toml index 931d22191..c7f0dcd0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ dependencies = [ "tqdm>=4.44", "torch", "torchvision", - "pydantic >= 1.10.5, < 2", + "pydantic >= 1.10.5", # Note: pytorch_lightning>=1.5 is required for CLI # https://github.com/lightly-ai/lightly/issues/912 "pytorch_lightning>=1.0.4", @@ -131,7 +131,7 @@ openapi = [ "python_dateutil >= 2.5.3", "setuptools >= 21.0.0", "urllib3 >= 1.25.3", - "pydantic >= 1.10.5, < 2", + "pydantic >= 1.10.5", "aenum >= 3.1.11" ] video = ["av>=8.0.3"] diff --git a/requirements/base.txt b/requirements/base.txt index d3dc4369d..964f4d668 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -9,5 +9,5 @@ requests>=2.23.0 six>=1.10 tqdm>=4.44 urllib3 >= 1.25.3 -pydantic >= 1.10.5, < 2 +pydantic >= 1.10.5 aenum >= 3.1.11 \ No newline at end of file diff --git a/requirements/openapi.txt b/requirements/openapi.txt index 74ede174a..c86e5fd4f 100644 --- a/requirements/openapi.txt +++ b/requirements/openapi.txt @@ -1,5 +1,5 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 -pydantic >= 1.10.5, < 2 +pydantic >= 1.10.5 aenum >= 3.1.11 diff --git a/tests/api_workflow/test_api_workflow_compute_worker.py b/tests/api_workflow/test_api_workflow_compute_worker.py index 5aa8f8789..492cd7186 100644 --- a/tests/api_workflow/test_api_workflow_compute_worker.py +++ b/tests/api_workflow/test_api_workflow_compute_worker.py @@ -5,7 +5,14 @@ from unittest.mock import MagicMock import pytest -from pydantic import ValidationError + +try: + # Pydantic >=v1.10.17 + from pydantic.v1 import ValidationError +except ImportError: + # Pydantic v1 + from pydantic import ValidationError + from pytest_mock import MockerFixture from lightly.api import ApiWorkflowClient, api_workflow_compute_worker