diff --git a/launch/api_client/__init__.py b/launch/api_client/__init__.py index 528259b2..ce19c32b 100644 --- a/launch/api_client/__init__.py +++ b/launch/api_client/__init__.py @@ -11,7 +11,7 @@ Generated by: https://openapi-generator.tech """ -__version__ = "1.0.6" +__version__ = "1.1.0" # import ApiClient from launch.api_client.api_client import ApiClient diff --git a/launch/api_client/api_client.py b/launch/api_client/api_client.py index 9f4dbbba..1a73582b 100644 --- a/launch/api_client/api_client.py +++ b/launch/api_client/api_client.py @@ -1033,7 +1033,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.0.6/python" + self.user_agent = "OpenAPI-Generator/1.1.0/python" def __enter__(self): return self diff --git a/launch/api_client/apis/path_to_api.py b/launch/api_client/apis/path_to_api.py index 89fa65fe..b767e3fe 100644 --- a/launch/api_client/apis/path_to_api.py +++ b/launch/api_client/apis/path_to_api.py @@ -32,6 +32,16 @@ V1ModelEndpointsSchemaJson, ) from launch.api_client.apis.paths.v1_sync_tasks import V1SyncTasks +from launch.api_client.apis.paths.v2_model_bundles import V2ModelBundles +from launch.api_client.apis.paths.v2_model_bundles_clone_with_changes import ( + V2ModelBundlesCloneWithChanges, +) +from launch.api_client.apis.paths.v2_model_bundles_latest import ( + V2ModelBundlesLatest, +) +from launch.api_client.apis.paths.v2_model_bundles_model_bundle_id import ( + V2ModelBundlesModelBundleId, +) from launch.api_client.paths import PathValues PathToApi = typing_extensions.TypedDict( @@ -53,6 +63,10 @@ PathValues.V1_MODELENDPOINTSSCHEMA_JSON: V1ModelEndpointsSchemaJson, PathValues.V1_MODELENDPOINTS_MODEL_ENDPOINT_ID: V1ModelEndpointsModelEndpointId, PathValues.V1_SYNCTASKS: V1SyncTasks, + PathValues.V2_MODELBUNDLES: V2ModelBundles, + PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES: V2ModelBundlesCloneWithChanges, + PathValues.V2_MODELBUNDLES_LATEST: V2ModelBundlesLatest, + PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID: V2ModelBundlesModelBundleId, }, ) @@ -74,5 +88,9 @@ PathValues.V1_MODELENDPOINTSSCHEMA_JSON: V1ModelEndpointsSchemaJson, PathValues.V1_MODELENDPOINTS_MODEL_ENDPOINT_ID: V1ModelEndpointsModelEndpointId, PathValues.V1_SYNCTASKS: V1SyncTasks, + PathValues.V2_MODELBUNDLES: V2ModelBundles, + PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES: V2ModelBundlesCloneWithChanges, + PathValues.V2_MODELBUNDLES_LATEST: V2ModelBundlesLatest, + PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID: V2ModelBundlesModelBundleId, } ) diff --git a/launch/api_client/apis/paths/v2_model_bundles.py b/launch/api_client/apis/paths/v2_model_bundles.py new file mode 100644 index 00000000..8545c6f2 --- /dev/null +++ b/launch/api_client/apis/paths/v2_model_bundles.py @@ -0,0 +1,9 @@ +from launch.api_client.paths.v2_model_bundles.get import ApiForget +from launch.api_client.paths.v2_model_bundles.post import ApiForpost + + +class V2ModelBundles( + ApiForget, + ApiForpost, +): + pass diff --git a/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py b/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py new file mode 100644 index 00000000..959b2207 --- /dev/null +++ b/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py @@ -0,0 +1,9 @@ +from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( + ApiForpost, +) + + +class V2ModelBundlesCloneWithChanges( + ApiForpost, +): + pass diff --git a/launch/api_client/apis/paths/v2_model_bundles_latest.py b/launch/api_client/apis/paths/v2_model_bundles_latest.py new file mode 100644 index 00000000..befb36ff --- /dev/null +++ b/launch/api_client/apis/paths/v2_model_bundles_latest.py @@ -0,0 +1,7 @@ +from launch.api_client.paths.v2_model_bundles_latest.get import ApiForget + + +class V2ModelBundlesLatest( + ApiForget, +): + pass diff --git a/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py b/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py new file mode 100644 index 00000000..e8ce8945 --- /dev/null +++ b/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py @@ -0,0 +1,9 @@ +from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ( + ApiForget, +) + + +class V2ModelBundlesModelBundleId( + ApiForget, +): + pass diff --git a/launch/api_client/apis/tags/default_api.py b/launch/api_client/apis/tags/default_api.py index 6a2bb4aa..bb06ab59 100644 --- a/launch/api_client/apis/tags/default_api.py +++ b/launch/api_client/apis/tags/default_api.py @@ -66,20 +66,39 @@ from launch.api_client.paths.v1_sync_tasks.post import ( CreateSyncInferenceTaskV1SyncTasksPost, ) +from launch.api_client.paths.v2_model_bundles.get import ( + ListModelBundlesV2ModelBundlesGet, +) +from launch.api_client.paths.v2_model_bundles.post import ( + CreateModelBundleV2ModelBundlesPost, +) +from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( + CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost, +) +from launch.api_client.paths.v2_model_bundles_latest.get import ( + GetLatestModelBundleV2ModelBundlesLatestGet, +) +from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ( + GetModelBundleV2ModelBundlesModelBundleIdGet, +) class DefaultApi( CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost, + CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost, CreateAsyncInferenceTaskV1AsyncTasksPost, CreateBatchJobV1BatchJobsPost, CreateModelBundleV1ModelBundlesPost, + CreateModelBundleV2ModelBundlesPost, CreateModelEndpointV1ModelEndpointsPost, CreateSyncInferenceTaskV1SyncTasksPost, DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete, GetAsyncInferenceTaskV1AsyncTasksTaskIdGet, GetBatchJobV1BatchJobsBatchJobIdGet, GetLatestModelBundleV1ModelBundlesLatestGet, + GetLatestModelBundleV2ModelBundlesLatestGet, GetModelBundleV1ModelBundlesModelBundleIdGet, + GetModelBundleV2ModelBundlesModelBundleIdGet, GetModelEndpointV1ModelEndpointsModelEndpointIdGet, GetModelEndpointsApiV1ModelEndpointsApiGet, GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet, @@ -87,6 +106,7 @@ class DefaultApi( HealthcheckHealthzGet, HealthcheckReadyzGet, ListModelBundlesV1ModelBundlesGet, + ListModelBundlesV2ModelBundlesGet, ListModelEndpointsV1ModelEndpointsGet, UpdateBatchJobV1BatchJobsBatchJobIdPut, UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut, diff --git a/launch/api_client/configuration.py b/launch/api_client/configuration.py index bf4be79b..9f3283cc 100644 --- a/launch/api_client/configuration.py +++ b/launch/api_client/configuration.py @@ -396,7 +396,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.0.0\n" - "SDK Package Version: 1.0.6".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 1.1.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/launch/api_client/docs/CallbackAuth.md b/launch/api_client/docs/CallbackAuth.md deleted file mode 100644 index 1067be14..00000000 --- a/launch/api_client/docs/CallbackAuth.md +++ /dev/null @@ -1,14 +0,0 @@ -# CallbackAuth - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **str** | | -**password** | **str** | | -**username** | **str** | | -**cert** | **str** | | -**key** | **str** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/launch/api_client/docs/CallbackBasicAuth.md b/launch/api_client/docs/CallbackBasicAuth.md deleted file mode 100644 index b0c30a12..00000000 --- a/launch/api_client/docs/CallbackBasicAuth.md +++ /dev/null @@ -1,12 +0,0 @@ -# CallbackBasicAuth - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **str** | | -**password** | **str** | | -**username** | **str** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/launch/api_client/docs/CallbackmTLSAuth.md b/launch/api_client/docs/CallbackmTLSAuth.md deleted file mode 100644 index 8e782b67..00000000 --- a/launch/api_client/docs/CallbackmTLSAuth.md +++ /dev/null @@ -1,12 +0,0 @@ -# CallbackmTLSAuth - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cert** | **str** | | -**key** | **str** | | -**kind** | **str** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/launch/api_client/model/clone_model_bundle_request.py b/launch/api_client/model/clone_model_bundle_v2_request.py similarity index 97% rename from launch/api_client/model/clone_model_bundle_request.py rename to launch/api_client/model/clone_model_bundle_v2_request.py index 02ca728c..2a918278 100644 --- a/launch/api_client/model/clone_model_bundle_request.py +++ b/launch/api_client/model/clone_model_bundle_v2_request.py @@ -23,7 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CloneModelBundleRequest(schemas.DictSchema): +class CloneModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -132,7 +132,7 @@ def __new__( tuple, bytes, ], - ) -> "CloneModelBundleRequest": + ) -> "CloneModelBundleV2Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_request.pyi b/launch/api_client/model/clone_model_bundle_v2_request.pyi similarity index 97% rename from launch/api_client/model/clone_model_bundle_request.pyi rename to launch/api_client/model/clone_model_bundle_v2_request.pyi index 0293a604..82891ae5 100644 --- a/launch/api_client/model/clone_model_bundle_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v2_request.pyi @@ -21,7 +21,7 @@ import frozendict # noqa: F401 import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 -class CloneModelBundleRequest(schemas.DictSchema): +class CloneModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -115,7 +115,7 @@ class CloneModelBundleRequest(schemas.DictSchema): tuple, bytes, ], - ) -> "CloneModelBundleRequest": + ) -> "CloneModelBundleV2Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.py b/launch/api_client/model/cloudpickle_artifact_flavor.py new file mode 100644 index 00000000..c0d3366d --- /dev/null +++ b/launch/api_client/model/cloudpickle_artifact_flavor.py @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 + +from launch.api_client import schemas # noqa: F401 + + +class CloudpickleArtifactFlavor(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + This is the entity-layer class for the Model Bundle flavor of a cloudpickle artifact. + """ + + class MetaOapg: + required = { + "flavor", + "requirements", + "framework", + "load_model_fn", + "location", + "load_predict_fn", + } + + class properties: + class flavor(schemas.EnumBase, schemas.StrSchema): + class MetaOapg: + enum_value_to_name = { + "cloudpickle_artifact": "CLOUDPICKLE_ARTIFACT", + } + + @schemas.classproperty + def CLOUDPICKLE_ARTIFACT(cls): + return cls("cloudpickle_artifact") + + class framework( + schemas.ComposedSchema, + ): + class MetaOapg: + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + PytorchFramework, + TensorflowFramework, + CustomFramework, + ] + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + + load_model_fn = schemas.StrSchema + load_predict_fn = schemas.StrSchema + location = schemas.StrSchema + + class requirements(schemas.ListSchema): + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> "requirements": + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + app_config = schemas.DictSchema + __annotations__ = { + "flavor": flavor, + "framework": framework, + "load_model_fn": load_model_fn, + "load_predict_fn": load_predict_fn, + "location": location, + "requirements": requirements, + "app_config": app_config, + } + + flavor: MetaOapg.properties.flavor + requirements: MetaOapg.properties.requirements + framework: MetaOapg.properties.framework + load_model_fn: MetaOapg.properties.load_model_fn + location: MetaOapg.properties.location + load_predict_fn: MetaOapg.properties.load_predict_fn + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: + ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: + ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn: typing.Union[ + MetaOapg.properties.load_model_fn, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn: typing.Union[ + MetaOapg.properties.load_predict_fn, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloudpickleArtifactFlavor": + return super().__new__( + cls, + *_args, + flavor=flavor, + requirements=requirements, + framework=framework, + load_model_fn=load_model_fn, + location=location, + load_predict_fn=load_predict_fn, + app_config=app_config, + _configuration=_configuration, + **kwargs, + ) + + +from launch.api_client.model.custom_framework import CustomFramework +from launch.api_client.model.pytorch_framework import PytorchFramework +from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.pyi b/launch/api_client/model/cloudpickle_artifact_flavor.pyi new file mode 100644 index 00000000..021e1b61 --- /dev/null +++ b/launch/api_client/model/cloudpickle_artifact_flavor.pyi @@ -0,0 +1,315 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +from launch_client import schemas # noqa: F401 + +class CloudpickleArtifactFlavor(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + This is the entity-layer class for the Model Bundle flavor of a cloudpickle artifact. + """ + + class MetaOapg: + required = { + "flavor", + "requirements", + "framework", + "load_model_fn", + "location", + "load_predict_fn", + } + + class properties: + class flavor(schemas.EnumBase, schemas.StrSchema): + @schemas.classproperty + def CLOUDPICKLE_ARTIFACT(cls): + return cls("cloudpickle_artifact") + + class framework( + schemas.ComposedSchema, + ): + class MetaOapg: + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + PytorchFramework, + TensorflowFramework, + CustomFramework, + ] + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + load_model_fn = schemas.StrSchema + load_predict_fn = schemas.StrSchema + location = schemas.StrSchema + + class requirements(schemas.ListSchema): + class MetaOapg: + items = schemas.StrSchema + def __new__( + cls, + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> "requirements": + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + app_config = schemas.DictSchema + __annotations__ = { + "flavor": flavor, + "framework": framework, + "load_model_fn": load_model_fn, + "load_predict_fn": load_predict_fn, + "location": location, + "requirements": requirements, + "app_config": app_config, + } + flavor: MetaOapg.properties.flavor + requirements: MetaOapg.properties.requirements + framework: MetaOapg.properties.framework + load_model_fn: MetaOapg.properties.load_model_fn + location: MetaOapg.properties.location + load_predict_fn: MetaOapg.properties.load_predict_fn + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... + @typing.overload + def __getitem__( + self, name: typing_extensions.Literal["load_predict_fn"] + ) -> MetaOapg.properties.load_predict_fn: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["load_predict_fn"] + ) -> MetaOapg.properties.load_predict_fn: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + return super().get_item_oapg(name) + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn: typing.Union[ + MetaOapg.properties.load_model_fn, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn: typing.Union[ + MetaOapg.properties.load_predict_fn, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloudpickleArtifactFlavor": + return super().__new__( + cls, + *_args, + flavor=flavor, + requirements=requirements, + framework=framework, + load_model_fn=load_model_fn, + location=location, + load_predict_fn=load_predict_fn, + app_config=app_config, + _configuration=_configuration, + **kwargs, + ) + +from launch_client.model.custom_framework import CustomFramework +from launch_client.model.pytorch_framework import PytorchFramework +from launch_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/create_async_task_response.py b/launch/api_client/model/create_async_task_response.py deleted file mode 100644 index 8944ed10..00000000 --- a/launch/api_client/model/create_async_task_response.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class CreateAsyncTaskResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "task_id", - } - - class properties: - task_id = schemas.StrSchema - __annotations__ = { - "task_id": task_id, - } - - task_id: MetaOapg.properties.task_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateAsyncTaskResponse": - return super().__new__( - cls, - *_args, - task_id=task_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/create_async_task_response.pyi b/launch/api_client/model/create_async_task_response.pyi deleted file mode 100644 index ea463023..00000000 --- a/launch/api_client/model/create_async_task_response.pyi +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class CreateAsyncTaskResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "task_id", - } - - class properties: - task_id = schemas.StrSchema - __annotations__ = { - "task_id": task_id, - } - task_id: MetaOapg.properties.task_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateAsyncTaskResponse": - return super().__new__( - cls, - *_args, - task_id=task_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/create_batch_job_request.py b/launch/api_client/model/create_batch_job_request.py deleted file mode 100644 index 52864d0c..00000000 --- a/launch/api_client/model/create_batch_job_request.py +++ /dev/null @@ -1,241 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class CreateBatchJobRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "model_bundle_id", - "resource_requests", - "serialization_format", - "input_path", - "labels", - } - - class properties: - input_path = schemas.StrSchema - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - model_bundle_id = schemas.StrSchema - - @staticmethod - def resource_requests() -> typing.Type["CreateBatchJobResourceRequests"]: - return CreateBatchJobResourceRequests - - @staticmethod - def serialization_format() -> typing.Type["BatchJobSerializationFormat"]: - return BatchJobSerializationFormat - - __annotations__ = { - "input_path": input_path, - "labels": labels, - "model_bundle_id": model_bundle_id, - "resource_requests": resource_requests, - "serialization_format": serialization_format, - } - - model_bundle_id: MetaOapg.properties.model_bundle_id - resource_requests: "CreateBatchJobResourceRequests" - serialization_format: "BatchJobSerializationFormat" - input_path: MetaOapg.properties.input_path - labels: MetaOapg.properties.labels - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - resource_requests: "CreateBatchJobResourceRequests", - serialization_format: "BatchJobSerializationFormat", - input_path: typing.Union[ - MetaOapg.properties.input_path, - str, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobRequest": - return super().__new__( - cls, - *_args, - model_bundle_id=model_bundle_id, - resource_requests=resource_requests, - serialization_format=serialization_format, - input_path=input_path, - labels=labels, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.batch_job_serialization_format import ( - BatchJobSerializationFormat, -) -from launch.api_client.model.create_batch_job_resource_requests import ( - CreateBatchJobResourceRequests, -) diff --git a/launch/api_client/model/create_batch_job_request.pyi b/launch/api_client/model/create_batch_job_request.pyi deleted file mode 100644 index a732e42e..00000000 --- a/launch/api_client/model/create_batch_job_request.pyi +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class CreateBatchJobRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "model_bundle_id", - "resource_requests", - "serialization_format", - "input_path", - "labels", - } - - class properties: - input_path = schemas.StrSchema - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - model_bundle_id = schemas.StrSchema - - @staticmethod - def resource_requests() -> typing.Type["CreateBatchJobResourceRequests"]: - return CreateBatchJobResourceRequests - @staticmethod - def serialization_format() -> typing.Type["BatchJobSerializationFormat"]: - return BatchJobSerializationFormat - __annotations__ = { - "input_path": input_path, - "labels": labels, - "model_bundle_id": model_bundle_id, - "resource_requests": resource_requests, - "serialization_format": serialization_format, - } - model_bundle_id: MetaOapg.properties.model_bundle_id - resource_requests: "CreateBatchJobResourceRequests" - serialization_format: "BatchJobSerializationFormat" - input_path: MetaOapg.properties.input_path - labels: MetaOapg.properties.labels - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["resource_requests"] - ) -> "CreateBatchJobResourceRequests": ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["serialization_format"] - ) -> "BatchJobSerializationFormat": ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - resource_requests: "CreateBatchJobResourceRequests", - serialization_format: "BatchJobSerializationFormat", - input_path: typing.Union[ - MetaOapg.properties.input_path, - str, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobRequest": - return super().__new__( - cls, - *_args, - model_bundle_id=model_bundle_id, - resource_requests=resource_requests, - serialization_format=serialization_format, - input_path=input_path, - labels=labels, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.batch_job_serialization_format import ( - BatchJobSerializationFormat, -) -from launch_client.model.create_batch_job_resource_requests import ( - CreateBatchJobResourceRequests, -) diff --git a/launch/api_client/model/create_batch_job_response.py b/launch/api_client/model/create_batch_job_response.py deleted file mode 100644 index f140358a..00000000 --- a/launch/api_client/model/create_batch_job_response.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class CreateBatchJobResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "job_id", - } - - class properties: - job_id = schemas.StrSchema - __annotations__ = { - "job_id": job_id, - } - - job_id: MetaOapg.properties.job_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - job_id: typing.Union[ - MetaOapg.properties.job_id, - str, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobResponse": - return super().__new__( - cls, - *_args, - job_id=job_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/create_batch_job_response.pyi b/launch/api_client/model/create_batch_job_response.pyi deleted file mode 100644 index 2421b064..00000000 --- a/launch/api_client/model/create_batch_job_response.pyi +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class CreateBatchJobResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "job_id", - } - - class properties: - job_id = schemas.StrSchema - __annotations__ = { - "job_id": job_id, - } - job_id: MetaOapg.properties.job_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - job_id: typing.Union[ - MetaOapg.properties.job_id, - str, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobResponse": - return super().__new__( - cls, - *_args, - job_id=job_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/create_model_bundle_request.py b/launch/api_client/model/create_model_bundle_request.py deleted file mode 100644 index c868221e..00000000 --- a/launch/api_client/model/create_model_bundle_request.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class CreateModelBundleRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Request object for creating a Model Bundle. - """ - - class MetaOapg: - required = { - "requirements", - "name", - "location", - "env_params", - } - - class properties: - @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: - return ModelBundleEnvironmentParams - - location = schemas.StrSchema - name = schemas.StrSchema - - class requirements(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - app_config = schemas.DictSchema - metadata = schemas.DictSchema - - @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: - return ModelBundlePackagingType - - schema_location = schemas.StrSchema - __annotations__ = { - "env_params": env_params, - "location": location, - "name": name, - "requirements": requirements, - "app_config": app_config, - "metadata": metadata, - "packaging_type": packaging_type, - "schema_location": schema_location, - } - - requirements: MetaOapg.properties.requirements - name: MetaOapg.properties.name - location: MetaOapg.properties.location - env_params: "ModelBundleEnvironmentParams" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "requirements", - "app_config", - "metadata", - "packaging_type", - "schema_location", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["packaging_type"] - ) -> typing.Union["ModelBundlePackagingType", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "requirements", - "app_config", - "metadata", - "packaging_type", - "schema_location", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - packaging_type: typing.Union["ModelBundlePackagingType", schemas.Unset] = schemas.unset, - schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleRequest": - return super().__new__( - cls, - *_args, - requirements=requirements, - name=name, - location=location, - env_params=env_params, - app_config=app_config, - metadata=metadata, - packaging_type=packaging_type, - schema_location=schema_location, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch.api_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, -) diff --git a/launch/api_client/model/create_model_bundle_request.pyi b/launch/api_client/model/create_model_bundle_request.pyi deleted file mode 100644 index 5cbf17ef..00000000 --- a/launch/api_client/model/create_model_bundle_request.pyi +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class CreateModelBundleRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Request object for creating a Model Bundle. - """ - - class MetaOapg: - required = { - "requirements", - "name", - "location", - "env_params", - } - - class properties: - @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: - return ModelBundleEnvironmentParams - location = schemas.StrSchema - name = schemas.StrSchema - - class requirements(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - app_config = schemas.DictSchema - metadata = schemas.DictSchema - - @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: - return ModelBundlePackagingType - schema_location = schemas.StrSchema - __annotations__ = { - "env_params": env_params, - "location": location, - "name": name, - "requirements": requirements, - "app_config": app_config, - "metadata": metadata, - "packaging_type": packaging_type, - "schema_location": schema_location, - } - requirements: MetaOapg.properties.requirements - name: MetaOapg.properties.name - location: MetaOapg.properties.location - env_params: "ModelBundleEnvironmentParams" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["schema_location"] - ) -> MetaOapg.properties.schema_location: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "requirements", - "app_config", - "metadata", - "packaging_type", - "schema_location", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["packaging_type"] - ) -> typing.Union["ModelBundlePackagingType", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "requirements", - "app_config", - "metadata", - "packaging_type", - "schema_location", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - packaging_type: typing.Union["ModelBundlePackagingType", schemas.Unset] = schemas.unset, - schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleRequest": - return super().__new__( - cls, - *_args, - requirements=requirements, - name=name, - location=location, - env_params=env_params, - app_config=app_config, - metadata=metadata, - packaging_type=packaging_type, - schema_location=schema_location, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, -) diff --git a/launch/api_client/model/create_model_bundle_v2_request.py b/launch/api_client/model/create_model_bundle_v2_request.py new file mode 100644 index 00000000..03ab98af --- /dev/null +++ b/launch/api_client/model/create_model_bundle_v2_request.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 + +from launch.api_client import schemas # noqa: F401 + + +class CreateModelBundleV2Request(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Request object for creating a Model Bundle. + """ + + class MetaOapg: + required = { + "flavor", + "name", + "schema_location", + } + + class properties: + class flavor( + schemas.ComposedSchema, + ): + class MetaOapg: + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + CloudpickleArtifactFlavor, + ZipArtifactFlavor, + RunnableImageFlavor, + ] + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + + name = schemas.StrSchema + schema_location = schemas.StrSchema + metadata = schemas.DictSchema + __annotations__ = { + "flavor": flavor, + "name": name, + "schema_location": schema_location, + "metadata": metadata, + } + + flavor: MetaOapg.properties.flavor + name: MetaOapg.properties.name + schema_location: MetaOapg.properties.schema_location + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: + ... + + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: + ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + schema_location: typing.Union[ + MetaOapg.properties.schema_location, + str, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV2Request": + return super().__new__( + cls, + *_args, + flavor=flavor, + name=name, + schema_location=schema_location, + metadata=metadata, + _configuration=_configuration, + **kwargs, + ) + + +from launch.api_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) +from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor +from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/create_model_bundle_v2_request.pyi b/launch/api_client/model/create_model_bundle_v2_request.pyi new file mode 100644 index 00000000..5bc70625 --- /dev/null +++ b/launch/api_client/model/create_model_bundle_v2_request.pyi @@ -0,0 +1,239 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +from launch_client import schemas # noqa: F401 + +class CreateModelBundleV2Request(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Request object for creating a Model Bundle. + """ + + class MetaOapg: + required = { + "flavor", + "name", + "schema_location", + } + + class properties: + class flavor( + schemas.ComposedSchema, + ): + class MetaOapg: + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + CloudpickleArtifactFlavor, + ZipArtifactFlavor, + RunnableImageFlavor, + ] + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + name = schemas.StrSchema + schema_location = schemas.StrSchema + metadata = schemas.DictSchema + __annotations__ = { + "flavor": flavor, + "name": name, + "schema_location": schema_location, + "metadata": metadata, + } + flavor: MetaOapg.properties.flavor + name: MetaOapg.properties.name + schema_location: MetaOapg.properties.schema_location + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload + def __getitem__( + self, name: typing_extensions.Literal["schema_location"] + ) -> MetaOapg.properties.schema_location: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> MetaOapg.properties.schema_location: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): + return super().get_item_oapg(name) + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + schema_location: typing.Union[ + MetaOapg.properties.schema_location, + str, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV2Request": + return super().__new__( + cls, + *_args, + flavor=flavor, + name=name, + schema_location=schema_location, + metadata=metadata, + _configuration=_configuration, + **kwargs, + ) + +from launch_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) +from launch_client.model.runnable_image_flavor import RunnableImageFlavor +from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/create_model_bundle_response.py b/launch/api_client/model/create_model_bundle_v2_response.py similarity index 96% rename from launch/api_client/model/create_model_bundle_response.py rename to launch/api_client/model/create_model_bundle_v2_response.py index 286e1a37..c108a9e0 100644 --- a/launch/api_client/model/create_model_bundle_response.py +++ b/launch/api_client/model/create_model_bundle_v2_response.py @@ -23,7 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelBundleResponse(schemas.DictSchema): +class CreateModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -107,7 +107,7 @@ def __new__( tuple, bytes, ], - ) -> "CreateModelBundleResponse": + ) -> "CreateModelBundleV2Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_response.pyi b/launch/api_client/model/create_model_bundle_v2_response.pyi similarity index 96% rename from launch/api_client/model/create_model_bundle_response.pyi rename to launch/api_client/model/create_model_bundle_v2_response.pyi index 30718f7d..7126d51c 100644 --- a/launch/api_client/model/create_model_bundle_response.pyi +++ b/launch/api_client/model/create_model_bundle_v2_response.pyi @@ -21,7 +21,7 @@ import frozendict # noqa: F401 import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 -class CreateModelBundleResponse(schemas.DictSchema): +class CreateModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -98,7 +98,7 @@ class CreateModelBundleResponse(schemas.DictSchema): tuple, bytes, ], - ) -> "CreateModelBundleResponse": + ) -> "CreateModelBundleV2Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_endpoint_request.py b/launch/api_client/model/create_model_endpoint_request.py deleted file mode 100644 index c75f5328..00000000 --- a/launch/api_client/model/create_model_endpoint_request.py +++ /dev/null @@ -1,802 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class CreateModelEndpointRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "endpoint_type", - "metadata", - "memory", - "cpus", - "max_workers", - "model_bundle_id", - "min_workers", - "gpus", - "name", - "per_worker", - "labels", - } - - class properties: - class cpus( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: - return ModelEndpointType - - class gpus(schemas.IntSchema): - class MetaOapg: - inclusive_minimum = 0 - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - class max_workers(schemas.IntSchema): - class MetaOapg: - inclusive_minimum = 0 - - class memory( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): - class MetaOapg: - inclusive_minimum = 0 - - model_bundle_id = schemas.StrSchema - - class name(schemas.StrSchema): - class MetaOapg: - max_length = 63 - - per_worker = schemas.IntSchema - billing_tags = schemas.DictSchema - - @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - - class default_callback_url(schemas.StrSchema): - class MetaOapg: - format = "uri" - max_length = 2083 - min_length = 1 - - @staticmethod - def gpu_type() -> typing.Type["GpuType"]: - return GpuType - - optimize_costs = schemas.BoolSchema - - class post_inference_hooks(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - prewarm = schemas.BoolSchema - - class storage( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - __annotations__ = { - "cpus": cpus, - "endpoint_type": endpoint_type, - "gpus": gpus, - "labels": labels, - "max_workers": max_workers, - "memory": memory, - "metadata": metadata, - "min_workers": min_workers, - "model_bundle_id": model_bundle_id, - "name": name, - "per_worker": per_worker, - "billing_tags": billing_tags, - "default_callback_auth": default_callback_auth, - "default_callback_url": default_callback_url, - "gpu_type": gpu_type, - "optimize_costs": optimize_costs, - "post_inference_hooks": post_inference_hooks, - "prewarm": prewarm, - "storage": storage, - } - - endpoint_type: "ModelEndpointType" - metadata: MetaOapg.properties.metadata - memory: MetaOapg.properties.memory - cpus: MetaOapg.properties.cpus - max_workers: MetaOapg.properties.max_workers - model_bundle_id: MetaOapg.properties.model_bundle_id - min_workers: MetaOapg.properties.min_workers - gpus: MetaOapg.properties.gpus - name: MetaOapg.properties.name - per_worker: MetaOapg.properties.per_worker - labels: MetaOapg.properties.labels - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - max_workers: typing.Union[ - MetaOapg.properties.max_workers, - decimal.Decimal, - int, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - min_workers: typing.Union[ - MetaOapg.properties.min_workers, - decimal.Decimal, - int, - ], - gpus: typing.Union[ - MetaOapg.properties.gpus, - decimal.Decimal, - int, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - per_worker: typing.Union[ - MetaOapg.properties.per_worker, - decimal.Decimal, - int, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, - optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelEndpointRequest": - return super().__new__( - cls, - *_args, - endpoint_type=endpoint_type, - metadata=metadata, - memory=memory, - cpus=cpus, - max_workers=max_workers, - model_bundle_id=model_bundle_id, - min_workers=min_workers, - gpus=gpus, - name=name, - per_worker=per_worker, - labels=labels, - billing_tags=billing_tags, - default_callback_auth=default_callback_auth, - default_callback_url=default_callback_url, - gpu_type=gpu_type, - optimize_costs=optimize_costs, - post_inference_hooks=post_inference_hooks, - prewarm=prewarm, - storage=storage, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.callback_auth import CallbackAuth -from launch.api_client.model.gpu_type import GpuType -from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/create_model_endpoint_request.pyi b/launch/api_client/model/create_model_endpoint_request.pyi deleted file mode 100644 index 3741c1c3..00000000 --- a/launch/api_client/model/create_model_endpoint_request.pyi +++ /dev/null @@ -1,697 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class CreateModelEndpointRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "endpoint_type", - "metadata", - "memory", - "cpus", - "max_workers", - "model_bundle_id", - "min_workers", - "gpus", - "name", - "per_worker", - "labels", - } - - class properties: - class cpus( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: - return ModelEndpointType - - class gpus(schemas.IntSchema): - pass - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - class max_workers(schemas.IntSchema): - pass - - class memory( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): - pass - model_bundle_id = schemas.StrSchema - - class name(schemas.StrSchema): - pass - per_worker = schemas.IntSchema - billing_tags = schemas.DictSchema - - @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - - class default_callback_url(schemas.StrSchema): - pass - @staticmethod - def gpu_type() -> typing.Type["GpuType"]: - return GpuType - optimize_costs = schemas.BoolSchema - - class post_inference_hooks(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - prewarm = schemas.BoolSchema - - class storage( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "cpus": cpus, - "endpoint_type": endpoint_type, - "gpus": gpus, - "labels": labels, - "max_workers": max_workers, - "memory": memory, - "metadata": metadata, - "min_workers": min_workers, - "model_bundle_id": model_bundle_id, - "name": name, - "per_worker": per_worker, - "billing_tags": billing_tags, - "default_callback_auth": default_callback_auth, - "default_callback_url": default_callback_url, - "gpu_type": gpu_type, - "optimize_costs": optimize_costs, - "post_inference_hooks": post_inference_hooks, - "prewarm": prewarm, - "storage": storage, - } - endpoint_type: "ModelEndpointType" - metadata: MetaOapg.properties.metadata - memory: MetaOapg.properties.memory - cpus: MetaOapg.properties.cpus - max_workers: MetaOapg.properties.max_workers - model_bundle_id: MetaOapg.properties.model_bundle_id - min_workers: MetaOapg.properties.min_workers - gpus: MetaOapg.properties.gpus - name: MetaOapg.properties.name - per_worker: MetaOapg.properties.per_worker - labels: MetaOapg.properties.labels - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - max_workers: typing.Union[ - MetaOapg.properties.max_workers, - decimal.Decimal, - int, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - min_workers: typing.Union[ - MetaOapg.properties.min_workers, - decimal.Decimal, - int, - ], - gpus: typing.Union[ - MetaOapg.properties.gpus, - decimal.Decimal, - int, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - per_worker: typing.Union[ - MetaOapg.properties.per_worker, - decimal.Decimal, - int, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, - optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelEndpointRequest": - return super().__new__( - cls, - *_args, - endpoint_type=endpoint_type, - metadata=metadata, - memory=memory, - cpus=cpus, - max_workers=max_workers, - model_bundle_id=model_bundle_id, - min_workers=min_workers, - gpus=gpus, - name=name, - per_worker=per_worker, - labels=labels, - billing_tags=billing_tags, - default_callback_auth=default_callback_auth, - default_callback_url=default_callback_url, - gpu_type=gpu_type, - optimize_costs=optimize_costs, - post_inference_hooks=post_inference_hooks, - prewarm=prewarm, - storage=storage, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.gpu_type import GpuType -from launch_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/sync_endpoint_predict_response.py b/launch/api_client/model/custom_framework.py similarity index 51% rename from launch/api_client/model/sync_endpoint_predict_response.py rename to launch/api_client/model/custom_framework.py index 3c497782..cf37e753 100644 --- a/launch/api_client/model/sync_endpoint_predict_response.py +++ b/launch/api_client/model/custom_framework.py @@ -23,43 +23,55 @@ from launch.api_client import schemas # noqa: F401 -class SyncEndpointPredictResponse(schemas.DictSchema): +class CustomFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + This is the entity-layer class for a custom framework specification. """ class MetaOapg: required = { - "status", + "image_repository", + "framework_type", + "image_tag", } class properties: - @staticmethod - def status() -> typing.Type["TaskStatus"]: - return TaskStatus - - result = schemas.AnyTypeSchema - traceback = schemas.StrSchema + class framework_type(schemas.EnumBase, schemas.StrSchema): + class MetaOapg: + enum_value_to_name = { + "custom_base_image": "CUSTOM_BASE_IMAGE", + } + + @schemas.classproperty + def CUSTOM_BASE_IMAGE(cls): + return cls("custom_base_image") + + image_repository = schemas.StrSchema + image_tag = schemas.StrSchema __annotations__ = { - "status": status, - "result": result, - "traceback": traceback, + "framework_type": framework_type, + "image_repository": image_repository, + "image_tag": image_tag, } - status: "TaskStatus" + image_repository: MetaOapg.properties.image_repository + framework_type: MetaOapg.properties.framework_type + image_tag: MetaOapg.properties.image_tag @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: + def __getitem__(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: + def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... @typing.overload @@ -70,9 +82,9 @@ def __getitem__( self, name: typing.Union[ typing_extensions.Literal[ - "status", - "result", - "traceback", + "framework_type", + "image_repository", + "image_tag", ], str, ], @@ -81,19 +93,17 @@ def __getitem__( return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... @typing.overload def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: + self, name: typing_extensions.Literal["image_repository"] + ) -> MetaOapg.properties.image_repository: ... @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: + def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... @typing.overload @@ -104,9 +114,9 @@ def get_item_oapg( self, name: typing.Union[ typing_extensions.Literal[ - "status", - "result", - "traceback", + "framework_type", + "image_repository", + "image_tag", ], str, ], @@ -119,28 +129,18 @@ def __new__( dict, frozendict.frozendict, ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, + image_repository: typing.Union[ + MetaOapg.properties.image_repository, str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], + image_tag: typing.Union[ + MetaOapg.properties.image_tag, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[ schemas.AnyTypeSchema, @@ -158,16 +158,13 @@ def __new__( tuple, bytes, ], - ) -> "SyncEndpointPredictResponse": + ) -> "CustomFramework": return super().__new__( cls, *_args, - status=status, - result=result, - traceback=traceback, + image_repository=image_repository, + framework_type=framework_type, + image_tag=image_tag, _configuration=_configuration, **kwargs, ) - - -from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/sync_endpoint_predict_response.pyi b/launch/api_client/model/custom_framework.pyi similarity index 52% rename from launch/api_client/model/sync_endpoint_predict_response.pyi rename to launch/api_client/model/custom_framework.pyi index b547fcea..0ccc9317 100644 --- a/launch/api_client/model/sync_endpoint_predict_response.pyi +++ b/launch/api_client/model/custom_framework.pyi @@ -21,46 +21,55 @@ import frozendict # noqa: F401 import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 -class SyncEndpointPredictResponse(schemas.DictSchema): +class CustomFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + This is the entity-layer class for a custom framework specification. """ class MetaOapg: required = { - "status", + "image_repository", + "framework_type", + "image_tag", } class properties: - @staticmethod - def status() -> typing.Type["TaskStatus"]: - return TaskStatus - result = schemas.AnyTypeSchema - traceback = schemas.StrSchema + class framework_type(schemas.EnumBase, schemas.StrSchema): + @schemas.classproperty + def CUSTOM_BASE_IMAGE(cls): + return cls("custom_base_image") + image_repository = schemas.StrSchema + image_tag = schemas.StrSchema __annotations__ = { - "status": status, - "result": result, - "traceback": traceback, + "framework_type": framework_type, + "image_repository": image_repository, + "image_tag": image_tag, } - status: "TaskStatus" + image_repository: MetaOapg.properties.image_repository + framework_type: MetaOapg.properties.framework_type + image_tag: MetaOapg.properties.image_tag @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + def __getitem__( + self, name: typing_extensions.Literal["image_repository"] + ) -> MetaOapg.properties.image_repository: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... + def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... def __getitem__( self, name: typing.Union[ typing_extensions.Literal[ - "status", - "result", - "traceback", + "framework_type", + "image_repository", + "image_tag", ], str, ], @@ -68,24 +77,24 @@ class SyncEndpointPredictResponse(schemas.DictSchema): # dict_instance[name] accessor return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... - @typing.overload def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + self, name: typing_extensions.Literal["framework_type"] + ) -> MetaOapg.properties.framework_type: ... @typing.overload def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... + self, name: typing_extensions.Literal["image_repository"] + ) -> MetaOapg.properties.image_repository: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... def get_item_oapg( self, name: typing.Union[ typing_extensions.Literal[ - "status", - "result", - "traceback", + "framework_type", + "image_repository", + "image_tag", ], str, ], @@ -97,28 +106,18 @@ class SyncEndpointPredictResponse(schemas.DictSchema): dict, frozendict.frozendict, ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, + image_repository: typing.Union[ + MetaOapg.properties.image_repository, str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], + image_tag: typing.Union[ + MetaOapg.properties.image_tag, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[ schemas.AnyTypeSchema, @@ -136,15 +135,13 @@ class SyncEndpointPredictResponse(schemas.DictSchema): tuple, bytes, ], - ) -> "SyncEndpointPredictResponse": + ) -> "CustomFramework": return super().__new__( cls, *_args, - status=status, - result=result, - traceback=traceback, + image_repository=image_repository, + framework_type=framework_type, + image_tag=image_tag, _configuration=_configuration, **kwargs, ) - -from launch_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/delete_model_endpoint_response.py b/launch/api_client/model/delete_model_endpoint_response.py deleted file mode 100644 index 54d4bbaa..00000000 --- a/launch/api_client/model/delete_model_endpoint_response.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class DeleteModelEndpointResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "deleted", - } - - class properties: - deleted = schemas.BoolSchema - __annotations__ = { - "deleted": deleted, - } - - deleted: MetaOapg.properties.deleted - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - deleted: typing.Union[ - MetaOapg.properties.deleted, - bool, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "DeleteModelEndpointResponse": - return super().__new__( - cls, - *_args, - deleted=deleted, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/delete_model_endpoint_response.pyi b/launch/api_client/model/delete_model_endpoint_response.pyi deleted file mode 100644 index a5b0efdd..00000000 --- a/launch/api_client/model/delete_model_endpoint_response.pyi +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class DeleteModelEndpointResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "deleted", - } - - class properties: - deleted = schemas.BoolSchema - __annotations__ = { - "deleted": deleted, - } - deleted: MetaOapg.properties.deleted - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - deleted: typing.Union[ - MetaOapg.properties.deleted, - bool, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "DeleteModelEndpointResponse": - return super().__new__( - cls, - *_args, - deleted=deleted, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/endpoint_predict_request.py b/launch/api_client/model/endpoint_predict_request.py deleted file mode 100644 index c8cfed1c..00000000 --- a/launch/api_client/model/endpoint_predict_request.py +++ /dev/null @@ -1,218 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class EndpointPredictRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - class properties: - args = schemas.AnyTypeSchema - - @staticmethod - def callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - - callback_url = schemas.StrSchema - cloudpickle = schemas.StrSchema - return_pickled = schemas.BoolSchema - url = schemas.StrSchema - __annotations__ = { - "args": args, - "callback_auth": callback_auth, - "callback_url": callback_url, - "cloudpickle": cloudpickle, - "return_pickled": return_pickled, - "url": url, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> "CallbackAuth": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["args"] - ) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_url"] - ) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cloudpickle"] - ) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["return_pickled"] - ) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["url"] - ) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - args: typing.Union[ - MetaOapg.properties.args, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - callback_url: typing.Union[MetaOapg.properties.callback_url, str, schemas.Unset] = schemas.unset, - cloudpickle: typing.Union[MetaOapg.properties.cloudpickle, str, schemas.Unset] = schemas.unset, - return_pickled: typing.Union[MetaOapg.properties.return_pickled, bool, schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "EndpointPredictRequest": - return super().__new__( - cls, - *_args, - args=args, - callback_auth=callback_auth, - callback_url=callback_url, - cloudpickle=cloudpickle, - return_pickled=return_pickled, - url=url, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.callback_auth import CallbackAuth diff --git a/launch/api_client/model/endpoint_predict_request.pyi b/launch/api_client/model/endpoint_predict_request.pyi deleted file mode 100644 index 656cb6f8..00000000 --- a/launch/api_client/model/endpoint_predict_request.pyi +++ /dev/null @@ -1,183 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class EndpointPredictRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - class properties: - args = schemas.AnyTypeSchema - - @staticmethod - def callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - callback_url = schemas.StrSchema - cloudpickle = schemas.StrSchema - return_pickled = schemas.BoolSchema - url = schemas.StrSchema - __annotations__ = { - "args": args, - "callback_auth": callback_auth, - "callback_url": callback_url, - "cloudpickle": cloudpickle, - "return_pickled": return_pickled, - "url": url, - } - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> "CallbackAuth": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["args"] - ) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_url"] - ) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cloudpickle"] - ) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["return_pickled"] - ) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["url"] - ) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - args: typing.Union[ - MetaOapg.properties.args, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - callback_url: typing.Union[MetaOapg.properties.callback_url, str, schemas.Unset] = schemas.unset, - cloudpickle: typing.Union[MetaOapg.properties.cloudpickle, str, schemas.Unset] = schemas.unset, - return_pickled: typing.Union[MetaOapg.properties.return_pickled, bool, schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "EndpointPredictRequest": - return super().__new__( - cls, - *_args, - args=args, - callback_auth=callback_auth, - callback_url=callback_url, - cloudpickle=cloudpickle, - return_pickled=return_pickled, - url=url, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.callback_auth import CallbackAuth diff --git a/launch/api_client/model/get_async_task_response.py b/launch/api_client/model/get_async_task_response.py deleted file mode 100644 index c21a3400..00000000 --- a/launch/api_client/model/get_async_task_response.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class GetAsyncTaskResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "task_id", - "status", - } - - class properties: - @staticmethod - def status() -> typing.Type["TaskStatus"]: - return TaskStatus - - task_id = schemas.StrSchema - result = schemas.AnyTypeSchema - traceback = schemas.StrSchema - __annotations__ = { - "status": status, - "task_id": task_id, - "result": result, - "traceback": traceback, - } - - task_id: MetaOapg.properties.task_id - status: "TaskStatus" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetAsyncTaskResponse": - return super().__new__( - cls, - *_args, - task_id=task_id, - status=status, - result=result, - traceback=traceback, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/get_async_task_response.pyi b/launch/api_client/model/get_async_task_response.pyi deleted file mode 100644 index 8dacef03..00000000 --- a/launch/api_client/model/get_async_task_response.pyi +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class GetAsyncTaskResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "task_id", - "status", - } - - class properties: - @staticmethod - def status() -> typing.Type["TaskStatus"]: - return TaskStatus - task_id = schemas.StrSchema - result = schemas.AnyTypeSchema - traceback = schemas.StrSchema - __annotations__ = { - "status": status, - "task_id": task_id, - "result": result, - "traceback": traceback, - } - task_id: MetaOapg.properties.task_id - status: "TaskStatus" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetAsyncTaskResponse": - return super().__new__( - cls, - *_args, - task_id=task_id, - status=status, - result=result, - traceback=traceback, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/get_batch_job_response.py b/launch/api_client/model/get_batch_job_response.py deleted file mode 100644 index 89a2f9d0..00000000 --- a/launch/api_client/model/get_batch_job_response.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class GetBatchJobResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "duration", - "status", - } - - class properties: - duration = schemas.NumberSchema - - @staticmethod - def status() -> typing.Type["BatchJobStatus"]: - return BatchJobStatus - - num_tasks_completed = schemas.IntSchema - num_tasks_pending = schemas.IntSchema - result = schemas.StrSchema - __annotations__ = { - "duration": duration, - "status": status, - "num_tasks_completed": num_tasks_completed, - "num_tasks_pending": num_tasks_pending, - "result": result, - } - - duration: MetaOapg.properties.duration - status: "BatchJobStatus" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> MetaOapg.properties.num_tasks_completed: - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> MetaOapg.properties.num_tasks_pending: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - duration: typing.Union[ - MetaOapg.properties.duration, - decimal.Decimal, - int, - float, - ], - status: "BatchJobStatus", - num_tasks_completed: typing.Union[ - MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - num_tasks_pending: typing.Union[ - MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - result: typing.Union[MetaOapg.properties.result, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetBatchJobResponse": - return super().__new__( - cls, - *_args, - duration=duration, - status=status, - num_tasks_completed=num_tasks_completed, - num_tasks_pending=num_tasks_pending, - result=result, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.batch_job_status import BatchJobStatus diff --git a/launch/api_client/model/get_batch_job_response.pyi b/launch/api_client/model/get_batch_job_response.pyi deleted file mode 100644 index ae4b676d..00000000 --- a/launch/api_client/model/get_batch_job_response.pyi +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class GetBatchJobResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "duration", - "status", - } - - class properties: - duration = schemas.NumberSchema - - @staticmethod - def status() -> typing.Type["BatchJobStatus"]: - return BatchJobStatus - num_tasks_completed = schemas.IntSchema - num_tasks_pending = schemas.IntSchema - result = schemas.StrSchema - __annotations__ = { - "duration": duration, - "status": status, - "num_tasks_completed": num_tasks_completed, - "num_tasks_pending": num_tasks_pending, - "result": result, - } - duration: MetaOapg.properties.duration - status: "BatchJobStatus" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> MetaOapg.properties.num_tasks_completed: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> MetaOapg.properties.num_tasks_pending: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - duration: typing.Union[ - MetaOapg.properties.duration, - decimal.Decimal, - int, - float, - ], - status: "BatchJobStatus", - num_tasks_completed: typing.Union[ - MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - num_tasks_pending: typing.Union[ - MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - result: typing.Union[MetaOapg.properties.result, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetBatchJobResponse": - return super().__new__( - cls, - *_args, - duration=duration, - status=status, - num_tasks_completed=num_tasks_completed, - num_tasks_pending=num_tasks_pending, - result=result, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.batch_job_status import BatchJobStatus diff --git a/launch/api_client/model/get_model_endpoint_response.py b/launch/api_client/model/get_model_endpoint_response.py deleted file mode 100644 index d497f926..00000000 --- a/launch/api_client/model/get_model_endpoint_response.py +++ /dev/null @@ -1,558 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class GetModelEndpointResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "endpoint_type", - "last_updated_at", - "destination", - "name", - "created_at", - "bundle_name", - "id", - "created_by", - "status", - } - - class properties: - bundle_name = schemas.StrSchema - created_at = schemas.DateTimeSchema - created_by = schemas.StrSchema - destination = schemas.StrSchema - - @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: - return ModelEndpointType - - id = schemas.StrSchema - last_updated_at = schemas.DateTimeSchema - name = schemas.StrSchema - - @staticmethod - def status() -> typing.Type["ModelEndpointStatus"]: - return ModelEndpointStatus - - aws_role = schemas.StrSchema - - @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - - class default_callback_url(schemas.StrSchema): - class MetaOapg: - format = "uri" - max_length = 2083 - min_length = 1 - - deployment_name = schemas.StrSchema - - @staticmethod - def deployment_state() -> typing.Type["ModelEndpointDeploymentState"]: - return ModelEndpointDeploymentState - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - metadata = schemas.DictSchema - num_queued_items = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def resource_state() -> typing.Type["ModelEndpointResourceState"]: - return ModelEndpointResourceState - - results_s3_bucket = schemas.StrSchema - __annotations__ = { - "bundle_name": bundle_name, - "created_at": created_at, - "created_by": created_by, - "destination": destination, - "endpoint_type": endpoint_type, - "id": id, - "last_updated_at": last_updated_at, - "name": name, - "status": status, - "aws_role": aws_role, - "default_callback_auth": default_callback_auth, - "default_callback_url": default_callback_url, - "deployment_name": deployment_name, - "deployment_state": deployment_state, - "labels": labels, - "metadata": metadata, - "num_queued_items": num_queued_items, - "post_inference_hooks": post_inference_hooks, - "resource_state": resource_state, - "results_s3_bucket": results_s3_bucket, - } - - endpoint_type: "ModelEndpointType" - last_updated_at: MetaOapg.properties.last_updated_at - destination: MetaOapg.properties.destination - name: MetaOapg.properties.name - created_at: MetaOapg.properties.created_at - bundle_name: MetaOapg.properties.bundle_name - id: MetaOapg.properties.id - created_by: MetaOapg.properties.created_by - status: "ModelEndpointStatus" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_name"]) -> MetaOapg.properties.deployment_name: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> "ModelEndpointDeploymentState": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_queued_items"]) -> MetaOapg.properties.num_queued_items: - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> "ModelEndpointResourceState": - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_name"] - ) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_state"] - ) -> typing.Union["ModelEndpointDeploymentState", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_queued_items"] - ) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["resource_state"] - ) -> typing.Union["ModelEndpointResourceState", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - last_updated_at: typing.Union[ - MetaOapg.properties.last_updated_at, - str, - datetime, - ], - destination: typing.Union[ - MetaOapg.properties.destination, - str, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - bundle_name: typing.Union[ - MetaOapg.properties.bundle_name, - str, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], - created_by: typing.Union[ - MetaOapg.properties.created_by, - str, - ], - status: "ModelEndpointStatus", - aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - deployment_name: typing.Union[MetaOapg.properties.deployment_name, str, schemas.Unset] = schemas.unset, - deployment_state: typing.Union["ModelEndpointDeploymentState", schemas.Unset] = schemas.unset, - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - num_queued_items: typing.Union[ - MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - resource_state: typing.Union["ModelEndpointResourceState", schemas.Unset] = schemas.unset, - results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetModelEndpointResponse": - return super().__new__( - cls, - *_args, - endpoint_type=endpoint_type, - last_updated_at=last_updated_at, - destination=destination, - name=name, - created_at=created_at, - bundle_name=bundle_name, - id=id, - created_by=created_by, - status=status, - aws_role=aws_role, - default_callback_auth=default_callback_auth, - default_callback_url=default_callback_url, - deployment_name=deployment_name, - deployment_state=deployment_state, - labels=labels, - metadata=metadata, - num_queued_items=num_queued_items, - post_inference_hooks=post_inference_hooks, - resource_state=resource_state, - results_s3_bucket=results_s3_bucket, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.callback_auth import CallbackAuth -from launch.api_client.model.model_endpoint_deployment_state import ( - ModelEndpointDeploymentState, -) -from launch.api_client.model.model_endpoint_resource_state import ( - ModelEndpointResourceState, -) -from launch.api_client.model.model_endpoint_status import ModelEndpointStatus -from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/get_model_endpoint_response.pyi b/launch/api_client/model/get_model_endpoint_response.pyi deleted file mode 100644 index 1d7670fa..00000000 --- a/launch/api_client/model/get_model_endpoint_response.pyi +++ /dev/null @@ -1,462 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class GetModelEndpointResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "endpoint_type", - "last_updated_at", - "destination", - "name", - "created_at", - "bundle_name", - "id", - "created_by", - "status", - } - - class properties: - bundle_name = schemas.StrSchema - created_at = schemas.DateTimeSchema - created_by = schemas.StrSchema - destination = schemas.StrSchema - - @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: - return ModelEndpointType - id = schemas.StrSchema - last_updated_at = schemas.DateTimeSchema - name = schemas.StrSchema - - @staticmethod - def status() -> typing.Type["ModelEndpointStatus"]: - return ModelEndpointStatus - aws_role = schemas.StrSchema - - @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - - class default_callback_url(schemas.StrSchema): - pass - deployment_name = schemas.StrSchema - - @staticmethod - def deployment_state() -> typing.Type["ModelEndpointDeploymentState"]: - return ModelEndpointDeploymentState - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - metadata = schemas.DictSchema - num_queued_items = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - @staticmethod - def resource_state() -> typing.Type["ModelEndpointResourceState"]: - return ModelEndpointResourceState - results_s3_bucket = schemas.StrSchema - __annotations__ = { - "bundle_name": bundle_name, - "created_at": created_at, - "created_by": created_by, - "destination": destination, - "endpoint_type": endpoint_type, - "id": id, - "last_updated_at": last_updated_at, - "name": name, - "status": status, - "aws_role": aws_role, - "default_callback_auth": default_callback_auth, - "default_callback_url": default_callback_url, - "deployment_name": deployment_name, - "deployment_state": deployment_state, - "labels": labels, - "metadata": metadata, - "num_queued_items": num_queued_items, - "post_inference_hooks": post_inference_hooks, - "resource_state": resource_state, - "results_s3_bucket": results_s3_bucket, - } - endpoint_type: "ModelEndpointType" - last_updated_at: MetaOapg.properties.last_updated_at - destination: MetaOapg.properties.destination - name: MetaOapg.properties.name - created_at: MetaOapg.properties.created_at - bundle_name: MetaOapg.properties.bundle_name - id: MetaOapg.properties.id - created_by: MetaOapg.properties.created_by - status: "ModelEndpointStatus" - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["last_updated_at"] - ) -> MetaOapg.properties.last_updated_at: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["deployment_name"] - ) -> MetaOapg.properties.deployment_name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> "ModelEndpointDeploymentState": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_queued_items"] - ) -> MetaOapg.properties.num_queued_items: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> "ModelEndpointResourceState": ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["last_updated_at"] - ) -> MetaOapg.properties.last_updated_at: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_name"] - ) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_state"] - ) -> typing.Union["ModelEndpointDeploymentState", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_queued_items"] - ) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["resource_state"] - ) -> typing.Union["ModelEndpointResourceState", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - last_updated_at: typing.Union[ - MetaOapg.properties.last_updated_at, - str, - datetime, - ], - destination: typing.Union[ - MetaOapg.properties.destination, - str, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - bundle_name: typing.Union[ - MetaOapg.properties.bundle_name, - str, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], - created_by: typing.Union[ - MetaOapg.properties.created_by, - str, - ], - status: "ModelEndpointStatus", - aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - deployment_name: typing.Union[MetaOapg.properties.deployment_name, str, schemas.Unset] = schemas.unset, - deployment_state: typing.Union["ModelEndpointDeploymentState", schemas.Unset] = schemas.unset, - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - num_queued_items: typing.Union[ - MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - resource_state: typing.Union["ModelEndpointResourceState", schemas.Unset] = schemas.unset, - results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetModelEndpointResponse": - return super().__new__( - cls, - *_args, - endpoint_type=endpoint_type, - last_updated_at=last_updated_at, - destination=destination, - name=name, - created_at=created_at, - bundle_name=bundle_name, - id=id, - created_by=created_by, - status=status, - aws_role=aws_role, - default_callback_auth=default_callback_auth, - default_callback_url=default_callback_url, - deployment_name=deployment_name, - deployment_state=deployment_state, - labels=labels, - metadata=metadata, - num_queued_items=num_queued_items, - post_inference_hooks=post_inference_hooks, - resource_state=resource_state, - results_s3_bucket=results_s3_bucket, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.model_endpoint_deployment_state import ( - ModelEndpointDeploymentState, -) -from launch_client.model.model_endpoint_resource_state import ( - ModelEndpointResourceState, -) -from launch_client.model.model_endpoint_status import ModelEndpointStatus -from launch_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/list_model_bundles_response.py b/launch/api_client/model/list_model_bundles_v2_response.py similarity index 88% rename from launch/api_client/model/list_model_bundles_response.py rename to launch/api_client/model/list_model_bundles_v2_response.py index 7244cc2a..1b92e7e3 100644 --- a/launch/api_client/model/list_model_bundles_response.py +++ b/launch/api_client/model/list_model_bundles_v2_response.py @@ -23,7 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ListModelBundlesResponse(schemas.DictSchema): +class ListModelBundlesV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -41,12 +41,12 @@ class properties: class model_bundles(schemas.ListSchema): class MetaOapg: @staticmethod - def items() -> typing.Type["ModelBundleResponse"]: - return ModelBundleResponse + def items() -> typing.Type["ModelBundleV2Response"]: + return ModelBundleV2Response def __new__( cls, - _arg: typing.Union[typing.Tuple["ModelBundleResponse"], typing.List["ModelBundleResponse"]], + _arg: typing.Union[typing.Tuple["ModelBundleV2Response"], typing.List["ModelBundleV2Response"]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> "model_bundles": return super().__new__( @@ -55,7 +55,7 @@ def __new__( _configuration=_configuration, ) - def __getitem__(self, i: int) -> "ModelBundleResponse": + def __getitem__(self, i: int) -> "ModelBundleV2Response": return super().__getitem__(i) __annotations__ = { @@ -127,7 +127,7 @@ def __new__( tuple, bytes, ], - ) -> "ListModelBundlesResponse": + ) -> "ListModelBundlesV2Response": return super().__new__( cls, *_args, @@ -137,4 +137,6 @@ def __new__( ) -from launch.api_client.model.model_bundle_response import ModelBundleResponse +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) diff --git a/launch/api_client/model/list_model_bundles_response.pyi b/launch/api_client/model/list_model_bundles_v2_response.pyi similarity index 88% rename from launch/api_client/model/list_model_bundles_response.pyi rename to launch/api_client/model/list_model_bundles_v2_response.pyi index 1b13ff50..ac37d268 100644 --- a/launch/api_client/model/list_model_bundles_response.pyi +++ b/launch/api_client/model/list_model_bundles_v2_response.pyi @@ -21,7 +21,7 @@ import frozendict # noqa: F401 import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 -class ListModelBundlesResponse(schemas.DictSchema): +class ListModelBundlesV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -39,11 +39,11 @@ class ListModelBundlesResponse(schemas.DictSchema): class model_bundles(schemas.ListSchema): class MetaOapg: @staticmethod - def items() -> typing.Type["ModelBundleResponse"]: - return ModelBundleResponse + def items() -> typing.Type["ModelBundleV2Response"]: + return ModelBundleV2Response def __new__( cls, - _arg: typing.Union[typing.Tuple["ModelBundleResponse"], typing.List["ModelBundleResponse"]], + _arg: typing.Union[typing.Tuple["ModelBundleV2Response"], typing.List["ModelBundleV2Response"]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> "model_bundles": return super().__new__( @@ -51,7 +51,7 @@ class ListModelBundlesResponse(schemas.DictSchema): _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> "ModelBundleResponse": + def __getitem__(self, i: int) -> "ModelBundleV2Response": return super().__getitem__(i) __annotations__ = { "model_bundles": model_bundles, @@ -111,7 +111,7 @@ class ListModelBundlesResponse(schemas.DictSchema): tuple, bytes, ], - ) -> "ListModelBundlesResponse": + ) -> "ListModelBundlesV2Response": return super().__new__( cls, *_args, @@ -120,4 +120,4 @@ class ListModelBundlesResponse(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_response import ModelBundleResponse +from launch_client.model.model_bundle_v2_response import ModelBundleV2Response diff --git a/launch/api_client/model/list_model_endpoints_response.py b/launch/api_client/model/list_model_endpoints_response.py deleted file mode 100644 index a61104ca..00000000 --- a/launch/api_client/model/list_model_endpoints_response.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class ListModelEndpointsResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "model_endpoints", - } - - class properties: - class model_endpoints(schemas.ListSchema): - class MetaOapg: - @staticmethod - def items() -> typing.Type["GetModelEndpointResponse"]: - return GetModelEndpointResponse - - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple["GetModelEndpointResponse"], - typing.List["GetModelEndpointResponse"], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_endpoints": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> "GetModelEndpointResponse": - return super().__getitem__(i) - - __annotations__ = { - "model_endpoints": model_endpoints, - } - - model_endpoints: MetaOapg.properties.model_endpoints - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_endpoints: typing.Union[ - MetaOapg.properties.model_endpoints, - list, - tuple, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelEndpointsResponse": - return super().__new__( - cls, - *_args, - model_endpoints=model_endpoints, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.get_model_endpoint_response import ( - GetModelEndpointResponse, -) diff --git a/launch/api_client/model/list_model_endpoints_response.pyi b/launch/api_client/model/list_model_endpoints_response.pyi deleted file mode 100644 index e3ea97b8..00000000 --- a/launch/api_client/model/list_model_endpoints_response.pyi +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class ListModelEndpointsResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "model_endpoints", - } - - class properties: - class model_endpoints(schemas.ListSchema): - class MetaOapg: - @staticmethod - def items() -> typing.Type["GetModelEndpointResponse"]: - return GetModelEndpointResponse - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple["GetModelEndpointResponse"], - typing.List["GetModelEndpointResponse"], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_endpoints": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - def __getitem__(self, i: int) -> "GetModelEndpointResponse": - return super().__getitem__(i) - __annotations__ = { - "model_endpoints": model_endpoints, - } - model_endpoints: MetaOapg.properties.model_endpoints - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_endpoints"] - ) -> MetaOapg.properties.model_endpoints: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_endpoints"] - ) -> MetaOapg.properties.model_endpoints: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_endpoints: typing.Union[ - MetaOapg.properties.model_endpoints, - list, - tuple, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelEndpointsResponse": - return super().__new__( - cls, - *_args, - model_endpoints=model_endpoints, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.get_model_endpoint_response import ( - GetModelEndpointResponse, -) diff --git a/launch/api_client/model/model_bundle_framework.py b/launch/api_client/model/model_bundle_framework.py deleted file mode 100644 index 093cc562..00000000 --- a/launch/api_client/model/model_bundle_framework.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class ModelBundleFramework(schemas.EnumBase, schemas.StrSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - - The canonical list of possible machine learning frameworks of Model Bundles. - - """ - - class MetaOapg: - enum_value_to_name = { - "pytorch": "PYTORCH", - "tensorflow": "TENSORFLOW", - "custom_base_image": "CUSTOM_BASE_IMAGE", - } - - @schemas.classproperty - def PYTORCH(cls): - return cls("pytorch") - - @schemas.classproperty - def TENSORFLOW(cls): - return cls("tensorflow") - - @schemas.classproperty - def CUSTOM_BASE_IMAGE(cls): - return cls("custom_base_image") diff --git a/launch/api_client/model/model_bundle_framework.pyi b/launch/api_client/model/model_bundle_framework.pyi deleted file mode 100644 index 52ae3fc6..00000000 --- a/launch/api_client/model/model_bundle_framework.pyi +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class ModelBundleFramework(schemas.EnumBase, schemas.StrSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - - The canonical list of possible machine learning frameworks of Model Bundles. - - """ - - @schemas.classproperty - def PYTORCH(cls): - return cls("pytorch") - @schemas.classproperty - def TENSORFLOW(cls): - return cls("tensorflow") - @schemas.classproperty - def CUSTOM_BASE_IMAGE(cls): - return cls("custom_base_image") diff --git a/launch/api_client/model/model_bundle_framework_type.py b/launch/api_client/model/model_bundle_framework_type.py index cbbdb61d..9acc5305 100644 --- a/launch/api_client/model/model_bundle_framework_type.py +++ b/launch/api_client/model/model_bundle_framework_type.py @@ -29,7 +29,9 @@ class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): Do not edit the class manually. + The canonical list of possible machine learning frameworks of Model Bundles. + """ class MetaOapg: diff --git a/launch/api_client/model/model_bundle_framework_type.pyi b/launch/api_client/model/model_bundle_framework_type.pyi index 6dac94df..52d4a8fe 100644 --- a/launch/api_client/model/model_bundle_framework_type.pyi +++ b/launch/api_client/model/model_bundle_framework_type.pyi @@ -27,7 +27,9 @@ class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): Do not edit the class manually. + The canonical list of possible machine learning frameworks of Model Bundles. + """ @schemas.classproperty diff --git a/launch/api_client/model/model_bundle_order_by.py b/launch/api_client/model/model_bundle_order_by.py index 987734ac..f4487f3f 100644 --- a/launch/api_client/model/model_bundle_order_by.py +++ b/launch/api_client/model/model_bundle_order_by.py @@ -29,7 +29,9 @@ class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): Do not edit the class manually. + The canonical list of possible orderings of Model Bundles. + """ class MetaOapg: diff --git a/launch/api_client/model/model_bundle_order_by.pyi b/launch/api_client/model/model_bundle_order_by.pyi index caa21cef..8e6fcd69 100644 --- a/launch/api_client/model/model_bundle_order_by.pyi +++ b/launch/api_client/model/model_bundle_order_by.pyi @@ -27,7 +27,9 @@ class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): Do not edit the class manually. + The canonical list of possible orderings of Model Bundles. + """ @schemas.classproperty diff --git a/launch/api_client/model/model_bundle_packaging_type.py b/launch/api_client/model/model_bundle_packaging_type.py index e97563f6..d839edd9 100644 --- a/launch/api_client/model/model_bundle_packaging_type.py +++ b/launch/api_client/model/model_bundle_packaging_type.py @@ -25,13 +25,15 @@ class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - The canonical list of possible packaging types for Model Bundles. + + The canonical list of possible packaging types for Model Bundles. These values broadly determine how the model endpoint will obtain its code & dependencies. + """ class MetaOapg: diff --git a/launch/api_client/model/model_bundle_packaging_type.pyi b/launch/api_client/model/model_bundle_packaging_type.pyi index 0ff122fb..dea525f3 100644 --- a/launch/api_client/model/model_bundle_packaging_type.pyi +++ b/launch/api_client/model/model_bundle_packaging_type.pyi @@ -23,13 +23,15 @@ from launch_client import schemas # noqa: F401 class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - The canonical list of possible packaging types for Model Bundles. + + The canonical list of possible packaging types for Model Bundles. These values broadly determine how the model endpoint will obtain its code & dependencies. + """ @schemas.classproperty diff --git a/launch/api_client/model/model_bundle_response.py b/launch/api_client/model/model_bundle_v2_response.py similarity index 64% rename from launch/api_client/model/model_bundle_response.py rename to launch/api_client/model/model_bundle_v2_response.py index 6b25056a..676b2d1f 100644 --- a/launch/api_client/model/model_bundle_response.py +++ b/launch/api_client/model/model_bundle_v2_response.py @@ -23,7 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelBundleResponse(schemas.DictSchema): +class ModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,66 +34,86 @@ class ModelBundleResponse(schemas.DictSchema): class MetaOapg: required = { + "flavor", "metadata", - "requirements", "model_artifact_ids", - "packaging_type", "name", "created_at", - "location", "id", - "env_params", } class properties: created_at = schemas.DateTimeSchema - @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: - return ModelBundleEnvironmentParams - - id = schemas.StrSchema - location = schemas.StrSchema - metadata = schemas.DictSchema - - class model_artifact_ids(schemas.ListSchema): + class flavor( + schemas.ComposedSchema, + ): class MetaOapg: - items = schemas.StrSchema + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + CloudpickleArtifactFlavor, + ZipArtifactFlavor, + RunnableImageFlavor, + ] def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_artifact_ids": + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": return super().__new__( cls, - _arg, + *_args, _configuration=_configuration, + **kwargs, ) - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - name = schemas.StrSchema - - @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: - return ModelBundlePackagingType + id = schemas.StrSchema + metadata = schemas.DictSchema - class requirements(schemas.ListSchema): + class model_artifact_ids(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema @@ -114,7 +134,7 @@ def __new__( ], ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> "model_artifact_ids": return super().__new__( cls, _arg, @@ -124,48 +144,37 @@ def __new__( def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - app_config = schemas.DictSchema + name = schemas.StrSchema schema_location = schemas.StrSchema __annotations__ = { "created_at": created_at, - "env_params": env_params, + "flavor": flavor, "id": id, - "location": location, "metadata": metadata, "model_artifact_ids": model_artifact_ids, "name": name, - "packaging_type": packaging_type, - "requirements": requirements, - "app_config": app_config, "schema_location": schema_location, } + flavor: MetaOapg.properties.flavor metadata: MetaOapg.properties.metadata - requirements: MetaOapg.properties.requirements model_artifact_ids: MetaOapg.properties.model_artifact_ids - packaging_type: "ModelBundlePackagingType" name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at - location: MetaOapg.properties.location id: MetaOapg.properties.id - env_params: "ModelBundleEnvironmentParams" @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... @@ -180,18 +189,6 @@ def __getitem__( def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: - ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... @@ -205,15 +202,11 @@ def __getitem__( name: typing.Union[ typing_extensions.Literal[ "created_at", - "env_params", + "flavor", "id", - "location", "metadata", "model_artifact_ids", "name", - "packaging_type", - "requirements", - "app_config", "schema_location", ], str, @@ -227,17 +220,13 @@ def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOa ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... @@ -252,20 +241,6 @@ def get_item_oapg( def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: - ... - @typing.overload def get_item_oapg( self, name: typing_extensions.Literal["schema_location"] @@ -281,15 +256,11 @@ def get_item_oapg( name: typing.Union[ typing_extensions.Literal[ "created_at", - "env_params", + "flavor", "id", - "location", "metadata", "model_artifact_ids", "name", - "packaging_type", - "requirements", - "app_config", "schema_location", ], str, @@ -303,22 +274,35 @@ def __new__( dict, frozendict.frozendict, ], - metadata: typing.Union[ - MetaOapg.properties.metadata, + flavor: typing.Union[ + MetaOapg.properties.flavor, dict, frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, list, tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, ], model_artifact_ids: typing.Union[ MetaOapg.properties.model_artifact_ids, list, tuple, ], - packaging_type: "ModelBundlePackagingType", name: typing.Union[ MetaOapg.properties.name, str, @@ -328,18 +312,10 @@ def __new__( str, datetime, ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], id: typing.Union[ MetaOapg.properties.id, str, ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[ @@ -358,29 +334,24 @@ def __new__( tuple, bytes, ], - ) -> "ModelBundleResponse": + ) -> "ModelBundleV2Response": return super().__new__( cls, *_args, + flavor=flavor, metadata=metadata, - requirements=requirements, model_artifact_ids=model_artifact_ids, - packaging_type=packaging_type, name=name, created_at=created_at, - location=location, id=id, - env_params=env_params, - app_config=app_config, schema_location=schema_location, _configuration=_configuration, **kwargs, ) -from launch.api_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch.api_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, +from launch.api_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, ) +from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor +from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/model_bundle_response.pyi b/launch/api_client/model/model_bundle_v2_response.pyi similarity index 64% rename from launch/api_client/model/model_bundle_response.pyi rename to launch/api_client/model/model_bundle_v2_response.pyi index 818f37cb..c9eea0b8 100644 --- a/launch/api_client/model/model_bundle_response.pyi +++ b/launch/api_client/model/model_bundle_v2_response.pyi @@ -21,7 +21,7 @@ import frozendict # noqa: F401 import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 -class ModelBundleResponse(schemas.DictSchema): +class ModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,62 +32,84 @@ class ModelBundleResponse(schemas.DictSchema): class MetaOapg: required = { + "flavor", "metadata", - "requirements", "model_artifact_ids", - "packaging_type", "name", "created_at", - "location", "id", - "env_params", } class properties: created_at = schemas.DateTimeSchema - @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: - return ModelBundleEnvironmentParams - id = schemas.StrSchema - location = schemas.StrSchema - metadata = schemas.DictSchema - - class model_artifact_ids(schemas.ListSchema): + class flavor( + schemas.ComposedSchema, + ): class MetaOapg: - items = schemas.StrSchema + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + CloudpickleArtifactFlavor, + ZipArtifactFlavor, + RunnableImageFlavor, + ] def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_artifact_ids": + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": return super().__new__( cls, - _arg, + *_args, _configuration=_configuration, + **kwargs, ) - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - name = schemas.StrSchema - - @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: - return ModelBundlePackagingType + id = schemas.StrSchema + metadata = schemas.DictSchema - class requirements(schemas.ListSchema): + class model_artifact_ids(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema def __new__( @@ -107,7 +129,7 @@ class ModelBundleResponse(schemas.DictSchema): ], ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> "model_artifact_ids": return super().__new__( cls, _arg, @@ -115,40 +137,31 @@ class ModelBundleResponse(schemas.DictSchema): ) def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - app_config = schemas.DictSchema + name = schemas.StrSchema schema_location = schemas.StrSchema __annotations__ = { "created_at": created_at, - "env_params": env_params, + "flavor": flavor, "id": id, - "location": location, "metadata": metadata, "model_artifact_ids": model_artifact_ids, "name": name, - "packaging_type": packaging_type, - "requirements": requirements, - "app_config": app_config, "schema_location": schema_location, } + flavor: MetaOapg.properties.flavor metadata: MetaOapg.properties.metadata - requirements: MetaOapg.properties.requirements model_artifact_ids: MetaOapg.properties.model_artifact_ids - packaging_type: "ModelBundlePackagingType" name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at - location: MetaOapg.properties.location id: MetaOapg.properties.id - env_params: "ModelBundleEnvironmentParams" @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... @typing.overload def __getitem__( @@ -157,12 +170,6 @@ class ModelBundleResponse(schemas.DictSchema): @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - @typing.overload def __getitem__( self, name: typing_extensions.Literal["schema_location"] ) -> MetaOapg.properties.schema_location: ... @@ -173,15 +180,11 @@ class ModelBundleResponse(schemas.DictSchema): name: typing.Union[ typing_extensions.Literal[ "created_at", - "env_params", + "flavor", "id", - "location", "metadata", "model_artifact_ids", "name", - "packaging_type", - "requirements", - "app_config", "schema_location", ], str, @@ -192,12 +195,10 @@ class ModelBundleResponse(schemas.DictSchema): @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... @typing.overload def get_item_oapg( @@ -206,14 +207,6 @@ class ModelBundleResponse(schemas.DictSchema): @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - @typing.overload def get_item_oapg( self, name: typing_extensions.Literal["schema_location"] ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... @@ -224,15 +217,11 @@ class ModelBundleResponse(schemas.DictSchema): name: typing.Union[ typing_extensions.Literal[ "created_at", - "env_params", + "flavor", "id", - "location", "metadata", "model_artifact_ids", "name", - "packaging_type", - "requirements", - "app_config", "schema_location", ], str, @@ -245,22 +234,35 @@ class ModelBundleResponse(schemas.DictSchema): dict, frozendict.frozendict, ], - metadata: typing.Union[ - MetaOapg.properties.metadata, + flavor: typing.Union[ + MetaOapg.properties.flavor, dict, frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, list, tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, ], model_artifact_ids: typing.Union[ MetaOapg.properties.model_artifact_ids, list, tuple, ], - packaging_type: "ModelBundlePackagingType", name: typing.Union[ MetaOapg.properties.name, str, @@ -270,18 +272,10 @@ class ModelBundleResponse(schemas.DictSchema): str, datetime, ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], id: typing.Union[ MetaOapg.properties.id, str, ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[ @@ -300,28 +294,23 @@ class ModelBundleResponse(schemas.DictSchema): tuple, bytes, ], - ) -> "ModelBundleResponse": + ) -> "ModelBundleV2Response": return super().__new__( cls, *_args, + flavor=flavor, metadata=metadata, - requirements=requirements, model_artifact_ids=model_artifact_ids, - packaging_type=packaging_type, name=name, created_at=created_at, - location=location, id=id, - env_params=env_params, - app_config=app_config, schema_location=schema_location, _configuration=_configuration, **kwargs, ) -from launch_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, +from launch_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, ) +from launch_client.model.runnable_image_flavor import RunnableImageFlavor +from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/model_endpoint_order_by.py b/launch/api_client/model/model_endpoint_order_by.py index e2eb86a1..bd4c6e0a 100644 --- a/launch/api_client/model/model_endpoint_order_by.py +++ b/launch/api_client/model/model_endpoint_order_by.py @@ -29,7 +29,9 @@ class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): Do not edit the class manually. + The canonical list of possible orderings of Model Bundles. + """ class MetaOapg: diff --git a/launch/api_client/model/model_endpoint_order_by.pyi b/launch/api_client/model/model_endpoint_order_by.pyi index 28193762..3f3d362f 100644 --- a/launch/api_client/model/model_endpoint_order_by.pyi +++ b/launch/api_client/model/model_endpoint_order_by.pyi @@ -27,7 +27,9 @@ class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): Do not edit the class manually. + The canonical list of possible orderings of Model Bundles. + """ @schemas.classproperty diff --git a/launch/api_client/model/update_model_endpoint_response.py b/launch/api_client/model/pytorch_framework.py similarity index 54% rename from launch/api_client/model/update_model_endpoint_response.py rename to launch/api_client/model/pytorch_framework.py index 8e34377f..08ccf102 100644 --- a/launch/api_client/model/update_model_endpoint_response.py +++ b/launch/api_client/model/pytorch_framework.py @@ -23,30 +23,49 @@ from launch.api_client import schemas # noqa: F401 -class UpdateModelEndpointResponse(schemas.DictSchema): +class PytorchFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + This is the entity-layer class for a Pytorch framework specification. """ class MetaOapg: required = { - "endpoint_creation_task_id", + "pytorch_image_tag", + "framework_type", } class properties: - endpoint_creation_task_id = schemas.StrSchema + class framework_type(schemas.EnumBase, schemas.StrSchema): + class MetaOapg: + enum_value_to_name = { + "pytorch": "PYTORCH", + } + + @schemas.classproperty + def PYTORCH(cls): + return cls("pytorch") + + pytorch_image_tag = schemas.StrSchema __annotations__ = { - "endpoint_creation_task_id": endpoint_creation_task_id, + "framework_type": framework_type, + "pytorch_image_tag": pytorch_image_tag, } - endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id + pytorch_image_tag: MetaOapg.properties.pytorch_image_tag + framework_type: MetaOapg.properties.framework_type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... @typing.overload def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: ... @typing.overload @@ -56,17 +75,24 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], str, ], ): # dict_instance[name] accessor return super().__getitem__(name) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: ... @typing.overload @@ -76,7 +102,10 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], str, ], ): @@ -88,8 +117,12 @@ def __new__( dict, frozendict.frozendict, ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, + pytorch_image_tag: typing.Union[ + MetaOapg.properties.pytorch_image_tag, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -109,11 +142,12 @@ def __new__( tuple, bytes, ], - ) -> "UpdateModelEndpointResponse": + ) -> "PytorchFramework": return super().__new__( cls, *_args, - endpoint_creation_task_id=endpoint_creation_task_id, + pytorch_image_tag=pytorch_image_tag, + framework_type=framework_type, _configuration=_configuration, **kwargs, ) diff --git a/launch/api_client/model/create_model_endpoint_response.pyi b/launch/api_client/model/pytorch_framework.pyi similarity index 55% rename from launch/api_client/model/create_model_endpoint_response.pyi rename to launch/api_client/model/pytorch_framework.pyi index f11048d6..422a2256 100644 --- a/launch/api_client/model/create_model_endpoint_response.pyi +++ b/launch/api_client/model/pytorch_framework.pyi @@ -21,35 +21,49 @@ import frozendict # noqa: F401 import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 -class CreateModelEndpointResponse(schemas.DictSchema): +class PytorchFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + This is the entity-layer class for a Pytorch framework specification. """ class MetaOapg: required = { - "endpoint_creation_task_id", + "pytorch_image_tag", + "framework_type", } class properties: - endpoint_creation_task_id = schemas.StrSchema + class framework_type(schemas.EnumBase, schemas.StrSchema): + @schemas.classproperty + def PYTORCH(cls): + return cls("pytorch") + pytorch_image_tag = schemas.StrSchema __annotations__ = { - "endpoint_creation_task_id": endpoint_creation_task_id, + "framework_type": framework_type, + "pytorch_image_tag": pytorch_image_tag, } - endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id + pytorch_image_tag: MetaOapg.properties.pytorch_image_tag + framework_type: MetaOapg.properties.framework_type + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... @typing.overload def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... def __getitem__( self, name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], str, ], ): @@ -57,14 +71,21 @@ class CreateModelEndpointResponse(schemas.DictSchema): return super().__getitem__(name) @typing.overload def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... + self, name: typing_extensions.Literal["framework_type"] + ) -> MetaOapg.properties.framework_type: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], str, ], ): @@ -75,8 +96,12 @@ class CreateModelEndpointResponse(schemas.DictSchema): dict, frozendict.frozendict, ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, + pytorch_image_tag: typing.Union[ + MetaOapg.properties.pytorch_image_tag, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -96,11 +121,12 @@ class CreateModelEndpointResponse(schemas.DictSchema): tuple, bytes, ], - ) -> "CreateModelEndpointResponse": + ) -> "PytorchFramework": return super().__new__( cls, *_args, - endpoint_creation_task_id=endpoint_creation_task_id, + pytorch_image_tag=pytorch_image_tag, + framework_type=framework_type, _configuration=_configuration, **kwargs, ) diff --git a/launch/api_client/model/runnable_image_flavor.py b/launch/api_client/model/runnable_image_flavor.py new file mode 100644 index 00000000..36105148 --- /dev/null +++ b/launch/api_client/model/runnable_image_flavor.py @@ -0,0 +1,298 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 + +from launch.api_client import schemas # noqa: F401 + + +class RunnableImageFlavor(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + This is the entity-layer class for the Model Bundle flavor of a runnable image. + """ + + class MetaOapg: + required = { + "flavor", + "protocol", + "tag", + "repository", + "command", + } + + class properties: + class command(schemas.ListSchema): + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> "command": + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + class flavor(schemas.EnumBase, schemas.StrSchema): + class MetaOapg: + enum_value_to_name = { + "runnable_image": "RUNNABLE_IMAGE", + } + + @schemas.classproperty + def RUNNABLE_IMAGE(cls): + return cls("runnable_image") + + class protocol(schemas.EnumBase, schemas.StrSchema): + class MetaOapg: + enum_value_to_name = { + "http": "HTTP", + } + + @schemas.classproperty + def HTTP(cls): + return cls("http") + + repository = schemas.StrSchema + tag = schemas.StrSchema + + class env(schemas.DictSchema): + class MetaOapg: + additional_properties = schemas.StrSchema + + def __getitem__( + self, + name: typing.Union[str,], + ) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg( + self, + name: typing.Union[str,], + ) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "env": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + + __annotations__ = { + "command": command, + "flavor": flavor, + "protocol": protocol, + "repository": repository, + "tag": tag, + "env": env, + } + + flavor: MetaOapg.properties.flavor + protocol: MetaOapg.properties.protocol + tag: MetaOapg.properties.tag + repository: MetaOapg.properties.repository + command: MetaOapg.properties.command + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: + ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: + ... + + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["env"] + ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: + ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + ], + str, + ], + ): + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + protocol: typing.Union[ + MetaOapg.properties.protocol, + str, + ], + tag: typing.Union[ + MetaOapg.properties.tag, + str, + ], + repository: typing.Union[ + MetaOapg.properties.repository, + str, + ], + command: typing.Union[ + MetaOapg.properties.command, + list, + tuple, + ], + env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "RunnableImageFlavor": + return super().__new__( + cls, + *_args, + flavor=flavor, + protocol=protocol, + tag=tag, + repository=repository, + command=command, + env=env, + _configuration=_configuration, + **kwargs, + ) diff --git a/launch/api_client/model/runnable_image_flavor.pyi b/launch/api_client/model/runnable_image_flavor.pyi new file mode 100644 index 00000000..2004c939 --- /dev/null +++ b/launch/api_client/model/runnable_image_flavor.pyi @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +from launch_client import schemas # noqa: F401 + +class RunnableImageFlavor(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + This is the entity-layer class for the Model Bundle flavor of a runnable image. + """ + + class MetaOapg: + required = { + "flavor", + "protocol", + "tag", + "repository", + "command", + } + + class properties: + class command(schemas.ListSchema): + class MetaOapg: + items = schemas.StrSchema + def __new__( + cls, + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> "command": + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + class flavor(schemas.EnumBase, schemas.StrSchema): + @schemas.classproperty + def RUNNABLE_IMAGE(cls): + return cls("runnable_image") + + class protocol(schemas.EnumBase, schemas.StrSchema): + @schemas.classproperty + def HTTP(cls): + return cls("http") + repository = schemas.StrSchema + tag = schemas.StrSchema + + class env(schemas.DictSchema): + class MetaOapg: + additional_properties = schemas.StrSchema + def __getitem__( + self, + name: typing.Union[str,], + ) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + def get_item_oapg( + self, + name: typing.Union[str,], + ) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "env": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "command": command, + "flavor": flavor, + "protocol": protocol, + "repository": repository, + "tag": tag, + "env": env, + } + flavor: MetaOapg.properties.flavor + protocol: MetaOapg.properties.protocol + tag: MetaOapg.properties.tag + repository: MetaOapg.properties.repository + command: MetaOapg.properties.command + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["env"] + ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + ], + str, + ], + ): + return super().get_item_oapg(name) + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + protocol: typing.Union[ + MetaOapg.properties.protocol, + str, + ], + tag: typing.Union[ + MetaOapg.properties.tag, + str, + ], + repository: typing.Union[ + MetaOapg.properties.repository, + str, + ], + command: typing.Union[ + MetaOapg.properties.command, + list, + tuple, + ], + env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "RunnableImageFlavor": + return super().__new__( + cls, + *_args, + flavor=flavor, + protocol=protocol, + tag=tag, + repository=repository, + command=command, + env=env, + _configuration=_configuration, + **kwargs, + ) diff --git a/launch/api_client/model/create_model_endpoint_response.py b/launch/api_client/model/tensorflow_framework.py similarity index 53% rename from launch/api_client/model/create_model_endpoint_response.py rename to launch/api_client/model/tensorflow_framework.py index e2cdf9c1..f7a0d24a 100644 --- a/launch/api_client/model/create_model_endpoint_response.py +++ b/launch/api_client/model/tensorflow_framework.py @@ -23,30 +23,49 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelEndpointResponse(schemas.DictSchema): +class TensorflowFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + This is the entity-layer class for a Tensorflow framework specification. """ class MetaOapg: required = { - "endpoint_creation_task_id", + "tensorflow_version", + "framework_type", } class properties: - endpoint_creation_task_id = schemas.StrSchema + class framework_type(schemas.EnumBase, schemas.StrSchema): + class MetaOapg: + enum_value_to_name = { + "tensorflow": "TENSORFLOW", + } + + @schemas.classproperty + def TENSORFLOW(cls): + return cls("tensorflow") + + tensorflow_version = schemas.StrSchema __annotations__ = { - "endpoint_creation_task_id": endpoint_creation_task_id, + "framework_type": framework_type, + "tensorflow_version": tensorflow_version, } - endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id + tensorflow_version: MetaOapg.properties.tensorflow_version + framework_type: MetaOapg.properties.framework_type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... @typing.overload def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: ... @typing.overload @@ -56,17 +75,24 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], str, ], ): # dict_instance[name] accessor return super().__getitem__(name) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: ... @typing.overload @@ -76,7 +102,10 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], str, ], ): @@ -88,8 +117,12 @@ def __new__( dict, frozendict.frozendict, ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, + tensorflow_version: typing.Union[ + MetaOapg.properties.tensorflow_version, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -109,11 +142,12 @@ def __new__( tuple, bytes, ], - ) -> "CreateModelEndpointResponse": + ) -> "TensorflowFramework": return super().__new__( cls, *_args, - endpoint_creation_task_id=endpoint_creation_task_id, + tensorflow_version=tensorflow_version, + framework_type=framework_type, _configuration=_configuration, **kwargs, ) diff --git a/launch/api_client/model/tensorflow_framework.pyi b/launch/api_client/model/tensorflow_framework.pyi new file mode 100644 index 00000000..9cf421c8 --- /dev/null +++ b/launch/api_client/model/tensorflow_framework.pyi @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +from launch_client import schemas # noqa: F401 + +class TensorflowFramework(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + This is the entity-layer class for a Tensorflow framework specification. + """ + + class MetaOapg: + required = { + "tensorflow_version", + "framework_type", + } + + class properties: + class framework_type(schemas.EnumBase, schemas.StrSchema): + @schemas.classproperty + def TENSORFLOW(cls): + return cls("tensorflow") + tensorflow_version = schemas.StrSchema + __annotations__ = { + "framework_type": framework_type, + "tensorflow_version": tensorflow_version, + } + tensorflow_version: MetaOapg.properties.tensorflow_version + framework_type: MetaOapg.properties.framework_type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload + def __getitem__( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["framework_type"] + ) -> MetaOapg.properties.framework_type: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], + str, + ], + ): + return super().get_item_oapg(name) + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + tensorflow_version: typing.Union[ + MetaOapg.properties.tensorflow_version, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "TensorflowFramework": + return super().__new__( + cls, + *_args, + tensorflow_version=tensorflow_version, + framework_type=framework_type, + _configuration=_configuration, + **kwargs, + ) diff --git a/launch/api_client/model/update_batch_job_request.py b/launch/api_client/model/update_batch_job_request.py deleted file mode 100644 index 84a751d6..00000000 --- a/launch/api_client/model/update_batch_job_request.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class UpdateBatchJobRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "cancel", - } - - class properties: - cancel = schemas.BoolSchema - __annotations__ = { - "cancel": cancel, - } - - cancel: MetaOapg.properties.cancel - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - cancel: typing.Union[ - MetaOapg.properties.cancel, - bool, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobRequest": - return super().__new__( - cls, - *_args, - cancel=cancel, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/update_batch_job_request.pyi b/launch/api_client/model/update_batch_job_request.pyi deleted file mode 100644 index 8c060506..00000000 --- a/launch/api_client/model/update_batch_job_request.pyi +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class UpdateBatchJobRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "cancel", - } - - class properties: - cancel = schemas.BoolSchema - __annotations__ = { - "cancel": cancel, - } - cancel: MetaOapg.properties.cancel - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - cancel: typing.Union[ - MetaOapg.properties.cancel, - bool, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobRequest": - return super().__new__( - cls, - *_args, - cancel=cancel, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/update_batch_job_response.py b/launch/api_client/model/update_batch_job_response.py deleted file mode 100644 index ffb4ad23..00000000 --- a/launch/api_client/model/update_batch_job_response.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class UpdateBatchJobResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "success", - } - - class properties: - success = schemas.BoolSchema - __annotations__ = { - "success": success, - } - - success: MetaOapg.properties.success - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - success: typing.Union[ - MetaOapg.properties.success, - bool, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobResponse": - return super().__new__( - cls, - *_args, - success=success, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/update_batch_job_response.pyi b/launch/api_client/model/update_batch_job_response.pyi deleted file mode 100644 index b6ed2feb..00000000 --- a/launch/api_client/model/update_batch_job_response.pyi +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class UpdateBatchJobResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "success", - } - - class properties: - success = schemas.BoolSchema - __annotations__ = { - "success": success, - } - success: MetaOapg.properties.success - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - success: typing.Union[ - MetaOapg.properties.success, - bool, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobResponse": - return super().__new__( - cls, - *_args, - success=success, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/update_model_endpoint_request.py b/launch/api_client/model/update_model_endpoint_request.py deleted file mode 100644 index 98a0fc06..00000000 --- a/launch/api_client/model/update_model_endpoint_request.py +++ /dev/null @@ -1,766 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 - -from launch.api_client import schemas # noqa: F401 - - -class UpdateModelEndpointRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - class properties: - aws_role = schemas.StrSchema - billing_tags = schemas.DictSchema - - class cpus( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - - class default_callback_url(schemas.StrSchema): - class MetaOapg: - format = "uri" - max_length = 2083 - min_length = 1 - - @staticmethod - def gpu_type() -> typing.Type["GpuType"]: - return GpuType - - class gpus(schemas.IntSchema): - class MetaOapg: - inclusive_minimum = 0 - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - class max_workers(schemas.IntSchema): - class MetaOapg: - inclusive_minimum = 0 - - class memory( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): - class MetaOapg: - inclusive_minimum = 0 - - model_bundle_id = schemas.StrSchema - optimize_costs = schemas.BoolSchema - per_worker = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - prewarm = schemas.BoolSchema - results_s3_bucket = schemas.StrSchema - - class storage( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - __annotations__ = { - "aws_role": aws_role, - "billing_tags": billing_tags, - "cpus": cpus, - "default_callback_auth": default_callback_auth, - "default_callback_url": default_callback_url, - "gpu_type": gpu_type, - "gpus": gpus, - "labels": labels, - "max_workers": max_workers, - "memory": memory, - "metadata": metadata, - "min_workers": min_workers, - "model_bundle_id": model_bundle_id, - "optimize_costs": optimize_costs, - "per_worker": per_worker, - "post_inference_hooks": post_inference_hooks, - "prewarm": prewarm, - "results_s3_bucket": results_s3_bucket, - "storage": storage, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: - ... - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: - ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: - ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cpus"] - ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["gpus"] - ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["max_workers"] - ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["memory"] - ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["min_workers"] - ) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["per_worker"] - ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: - ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, - gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, schemas.Unset] = schemas.unset, - optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateModelEndpointRequest": - return super().__new__( - cls, - *_args, - aws_role=aws_role, - billing_tags=billing_tags, - cpus=cpus, - default_callback_auth=default_callback_auth, - default_callback_url=default_callback_url, - gpu_type=gpu_type, - gpus=gpus, - labels=labels, - max_workers=max_workers, - memory=memory, - metadata=metadata, - min_workers=min_workers, - model_bundle_id=model_bundle_id, - optimize_costs=optimize_costs, - per_worker=per_worker, - post_inference_hooks=post_inference_hooks, - prewarm=prewarm, - results_s3_bucket=results_s3_bucket, - storage=storage, - _configuration=_configuration, - **kwargs, - ) - - -from launch.api_client.model.callback_auth import CallbackAuth -from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/update_model_endpoint_request.pyi b/launch/api_client/model/update_model_endpoint_request.pyi deleted file mode 100644 index 9e376da4..00000000 --- a/launch/api_client/model/update_model_endpoint_request.pyi +++ /dev/null @@ -1,662 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class UpdateModelEndpointRequest(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - class properties: - aws_role = schemas.StrSchema - billing_tags = schemas.DictSchema - - class cpus( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: - return CallbackAuth - - class default_callback_url(schemas.StrSchema): - pass - @staticmethod - def gpu_type() -> typing.Type["GpuType"]: - return GpuType - - class gpus(schemas.IntSchema): - pass - - class labels(schemas.DictSchema): - class MetaOapg: - additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - class max_workers(schemas.IntSchema): - pass - - class memory( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): - pass - model_bundle_id = schemas.StrSchema - optimize_costs = schemas.BoolSchema - per_worker = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): - class MetaOapg: - items = schemas.StrSchema - def __new__( - cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - prewarm = schemas.BoolSchema - results_s3_bucket = schemas.StrSchema - - class storage( - schemas.ComposedSchema, - ): - class MetaOapg: - any_of_0 = schemas.StrSchema - any_of_1 = schemas.IntSchema - any_of_2 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - ] - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "aws_role": aws_role, - "billing_tags": billing_tags, - "cpus": cpus, - "default_callback_auth": default_callback_auth, - "default_callback_url": default_callback_url, - "gpu_type": gpu_type, - "gpus": gpus, - "labels": labels, - "max_workers": max_workers, - "memory": memory, - "metadata": metadata, - "min_workers": min_workers, - "model_bundle_id": model_bundle_id, - "optimize_costs": optimize_costs, - "per_worker": per_worker, - "post_inference_hooks": post_inference_hooks, - "prewarm": prewarm, - "results_s3_bucket": results_s3_bucket, - "storage": storage, - } - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cpus"] - ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["gpus"] - ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["max_workers"] - ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["memory"] - ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["min_workers"] - ) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["per_worker"] - ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, - gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, schemas.Unset] = schemas.unset, - optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateModelEndpointRequest": - return super().__new__( - cls, - *_args, - aws_role=aws_role, - billing_tags=billing_tags, - cpus=cpus, - default_callback_auth=default_callback_auth, - default_callback_url=default_callback_url, - gpu_type=gpu_type, - gpus=gpus, - labels=labels, - max_workers=max_workers, - memory=memory, - metadata=metadata, - min_workers=min_workers, - model_bundle_id=model_bundle_id, - optimize_costs=optimize_costs, - per_worker=per_worker, - post_inference_hooks=post_inference_hooks, - prewarm=prewarm, - results_s3_bucket=results_s3_bucket, - storage=storage, - _configuration=_configuration, - **kwargs, - ) - -from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/update_model_endpoint_response.pyi b/launch/api_client/model/update_model_endpoint_response.pyi deleted file mode 100644 index 692169f5..00000000 --- a/launch/api_client/model/update_model_endpoint_response.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - launch - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 - -import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 - -class UpdateModelEndpointResponse(schemas.DictSchema): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - class MetaOapg: - required = { - "endpoint_creation_task_id", - } - - class properties: - endpoint_creation_task_id = schemas.StrSchema - __annotations__ = { - "endpoint_creation_task_id": endpoint_creation_task_id, - } - endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - - @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): - # dict_instance[name] accessor - return super().__getitem__(name) - @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): - return super().get_item_oapg(name) - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, - str, - ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateModelEndpointResponse": - return super().__new__( - cls, - *_args, - endpoint_creation_task_id=endpoint_creation_task_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/launch/api_client/model/zip_artifact_flavor.py b/launch/api_client/model/zip_artifact_flavor.py new file mode 100644 index 00000000..79286ebc --- /dev/null +++ b/launch/api_client/model/zip_artifact_flavor.py @@ -0,0 +1,367 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 + +from launch.api_client import schemas # noqa: F401 + + +class ZipArtifactFlavor(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + This is the entity-layer class for the Model Bundle flavor of a zip artifact. + """ + + class MetaOapg: + required = { + "flavor", + "requirements", + "framework", + "load_model_fn_module_path", + "location", + "load_predict_fn_module_path", + } + + class properties: + class flavor(schemas.EnumBase, schemas.StrSchema): + class MetaOapg: + enum_value_to_name = { + "zip_artifact": "ZIP_ARTIFACT", + } + + @schemas.classproperty + def ZIP_ARTIFACT(cls): + return cls("zip_artifact") + + class framework( + schemas.ComposedSchema, + ): + class MetaOapg: + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + PytorchFramework, + TensorflowFramework, + CustomFramework, + ] + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + + load_model_fn_module_path = schemas.StrSchema + load_predict_fn_module_path = schemas.StrSchema + location = schemas.StrSchema + + class requirements(schemas.ListSchema): + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> "requirements": + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + app_config = schemas.DictSchema + __annotations__ = { + "flavor": flavor, + "framework": framework, + "load_model_fn_module_path": load_model_fn_module_path, + "load_predict_fn_module_path": load_predict_fn_module_path, + "location": location, + "requirements": requirements, + "app_config": app_config, + } + + flavor: MetaOapg.properties.flavor + requirements: MetaOapg.properties.requirements + framework: MetaOapg.properties.framework + load_model_fn_module_path: MetaOapg.properties.load_model_fn_module_path + location: MetaOapg.properties.location + load_predict_fn_module_path: MetaOapg.properties.load_predict_fn_module_path + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + + @typing.overload + def __getitem__( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: + ... + + @typing.overload + def __getitem__( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: + ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: + ... + + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: + ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn_module_path: typing.Union[ + MetaOapg.properties.load_model_fn_module_path, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn_module_path: typing.Union[ + MetaOapg.properties.load_predict_fn_module_path, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ZipArtifactFlavor": + return super().__new__( + cls, + *_args, + flavor=flavor, + requirements=requirements, + framework=framework, + load_model_fn_module_path=load_model_fn_module_path, + location=location, + load_predict_fn_module_path=load_predict_fn_module_path, + app_config=app_config, + _configuration=_configuration, + **kwargs, + ) + + +from launch.api_client.model.custom_framework import CustomFramework +from launch.api_client.model.pytorch_framework import PytorchFramework +from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/zip_artifact_flavor.pyi b/launch/api_client/model/zip_artifact_flavor.pyi new file mode 100644 index 00000000..ac4b9816 --- /dev/null +++ b/launch/api_client/model/zip_artifact_flavor.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +from launch_client import schemas # noqa: F401 + +class ZipArtifactFlavor(schemas.DictSchema): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + This is the entity-layer class for the Model Bundle flavor of a zip artifact. + """ + + class MetaOapg: + required = { + "flavor", + "requirements", + "framework", + "load_model_fn_module_path", + "location", + "load_predict_fn_module_path", + } + + class properties: + class flavor(schemas.EnumBase, schemas.StrSchema): + @schemas.classproperty + def ZIP_ARTIFACT(cls): + return cls("zip_artifact") + + class framework( + schemas.ComposedSchema, + ): + class MetaOapg: + @classmethod + @functools.lru_cache() + def one_of(cls): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + return [ + PytorchFramework, + TensorflowFramework, + CustomFramework, + ] + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + load_model_fn_module_path = schemas.StrSchema + load_predict_fn_module_path = schemas.StrSchema + location = schemas.StrSchema + + class requirements(schemas.ListSchema): + class MetaOapg: + items = schemas.StrSchema + def __new__( + cls, + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> "requirements": + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + app_config = schemas.DictSchema + __annotations__ = { + "flavor": flavor, + "framework": framework, + "load_model_fn_module_path": load_model_fn_module_path, + "load_predict_fn_module_path": load_predict_fn_module_path, + "location": location, + "requirements": requirements, + "app_config": app_config, + } + flavor: MetaOapg.properties.flavor + requirements: MetaOapg.properties.requirements + framework: MetaOapg.properties.framework + load_model_fn_module_path: MetaOapg.properties.load_model_fn_module_path + location: MetaOapg.properties.location + load_predict_fn_module_path: MetaOapg.properties.load_predict_fn_module_path + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload + def __getitem__( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: ... + @typing.overload + def __getitem__( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + # dict_instance[name] accessor + return super().__getitem__(name) + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): + return super().get_item_oapg(name) + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn_module_path: typing.Union[ + MetaOapg.properties.load_model_fn_module_path, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn_module_path: typing.Union[ + MetaOapg.properties.load_predict_fn_module_path, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ZipArtifactFlavor": + return super().__new__( + cls, + *_args, + flavor=flavor, + requirements=requirements, + framework=framework, + load_model_fn_module_path=load_model_fn_module_path, + location=location, + load_predict_fn_module_path=load_predict_fn_module_path, + app_config=app_config, + _configuration=_configuration, + **kwargs, + ) + +from launch_client.model.custom_framework import CustomFramework +from launch_client.model.pytorch_framework import PytorchFramework +from launch_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/models/__init__.py b/launch/api_client/models/__init__.py index cf694480..c53bd498 100644 --- a/launch/api_client/models/__init__.py +++ b/launch/api_client/models/__init__.py @@ -21,6 +21,12 @@ from launch.api_client.model.clone_model_bundle_v1_request import ( CloneModelBundleV1Request, ) +from launch.api_client.model.clone_model_bundle_v2_request import ( + CloneModelBundleV2Request, +) +from launch.api_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) from launch.api_client.model.create_async_task_v1_response import ( CreateAsyncTaskV1Response, ) @@ -39,12 +45,19 @@ from launch.api_client.model.create_model_bundle_v1_response import ( CreateModelBundleV1Response, ) +from launch.api_client.model.create_model_bundle_v2_request import ( + CreateModelBundleV2Request, +) +from launch.api_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) from launch.api_client.model.create_model_endpoint_v1_request import ( CreateModelEndpointV1Request, ) from launch.api_client.model.create_model_endpoint_v1_response import ( CreateModelEndpointV1Response, ) +from launch.api_client.model.custom_framework import CustomFramework from launch.api_client.model.delete_model_endpoint_v1_response import ( DeleteModelEndpointV1Response, ) @@ -65,6 +78,9 @@ from launch.api_client.model.list_model_bundles_v1_response import ( ListModelBundlesV1Response, ) +from launch.api_client.model.list_model_bundles_v2_response import ( + ListModelBundlesV2Response, +) from launch.api_client.model.list_model_endpoints_v1_response import ( ListModelEndpointsV1Response, ) @@ -81,6 +97,9 @@ from launch.api_client.model.model_bundle_v1_response import ( ModelBundleV1Response, ) +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) from launch.api_client.model.model_endpoint_deployment_state import ( ModelEndpointDeploymentState, ) @@ -92,12 +111,15 @@ ) from launch.api_client.model.model_endpoint_status import ModelEndpointStatus from launch.api_client.model.model_endpoint_type import ModelEndpointType +from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.request_schema import RequestSchema from launch.api_client.model.response_schema import ResponseSchema +from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor from launch.api_client.model.sync_endpoint_predict_v1_response import ( SyncEndpointPredictV1Response, ) from launch.api_client.model.task_status import TaskStatus +from launch.api_client.model.tensorflow_framework import TensorflowFramework from launch.api_client.model.update_batch_job_v1_request import ( UpdateBatchJobV1Request, ) @@ -111,3 +133,4 @@ UpdateModelEndpointV1Response, ) from launch.api_client.model.validation_error import ValidationError +from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/paths/__init__.py b/launch/api_client/paths/__init__.py index d7e772a6..ad7de503 100644 --- a/launch/api_client/paths/__init__.py +++ b/launch/api_client/paths/__init__.py @@ -22,3 +22,7 @@ class PathValues(str, enum.Enum): V1_MODELENDPOINTSSCHEMA_JSON = "/v1/model-endpoints-schema.json" V1_MODELENDPOINTS_MODEL_ENDPOINT_ID = "/v1/model-endpoints/{model_endpoint_id}" V1_SYNCTASKS = "/v1/sync-tasks" + V2_MODELBUNDLES = "/v2/model-bundles" + V2_MODELBUNDLES_CLONEWITHCHANGES = "/v2/model-bundles/clone-with-changes" + V2_MODELBUNDLES_LATEST = "/v2/model-bundles/latest" + V2_MODELBUNDLES_MODEL_BUNDLE_ID = "/v2/model-bundles/{model_bundle_id}" diff --git a/launch/api_client/paths/v2_model_bundles/__init__.py b/launch/api_client/paths/v2_model_bundles/__init__.py new file mode 100644 index 00000000..4de08029 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from launch.api_client.paths.v2_model_bundles import Api + +from launch.api_client.paths import PathValues + +path = PathValues.V2_MODELBUNDLES diff --git a/launch/api_client/paths/v2_model_bundles/get.py b/launch/api_client/paths/v2_model_bundles/get.py new file mode 100644 index 00000000..e9608072 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles/get.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.list_model_bundles_v2_response import ( + ListModelBundlesV2Response, +) +from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy + +from . import path + +# Query params +ModelNameSchema = schemas.StrSchema +OrderBySchema = ModelBundleOrderBy +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestOptionalQueryParams = typing_extensions.TypedDict( + "RequestOptionalQueryParams", + { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + "order_by": typing.Union[OrderBySchema,], + }, + total=False, +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_model_name = api_client.QueryParameter( + name="model_name", + style=api_client.ParameterStyle.FORM, + schema=ModelNameSchema, + explode=True, +) +request_query_order_by = api_client.QueryParameter( + name="order_by", + style=api_client.ParameterStyle.FORM, + schema=OrderBySchema, + explode=True, +) +_auth = [ + "HTTPBasic", +] +SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV2Response + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + "200": _response_for_200, + "422": _response_for_422, +} +_all_accept_content_types = ("application/json",) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List Model Bundles + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_model_name, + request_query_order_by, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method="get".upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + + +class ListModelBundlesV2ModelBundlesGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_model_bundles_v2_model_bundles_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def list_model_bundles_v2_model_bundles_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def list_model_bundles_v2_model_bundles_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def list_model_bundles_v2_model_bundles_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_model_bundles_v2_model_bundles_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_model_bundles_v2_model_bundles_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles/get.pyi b/launch/api_client/paths/v2_model_bundles/get.pyi new file mode 100644 index 00000000..662b5c99 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles/get.pyi @@ -0,0 +1,269 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.list_model_bundles_v2_response import ( + ListModelBundlesV2Response, +) +from launch_client.model.model_bundle_order_by import ModelBundleOrderBy +from urllib3._collections import HTTPHeaderDict + +# Query params +ModelNameSchema = schemas.StrSchema +OrderBySchema = ModelBundleOrderBy +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestOptionalQueryParams = typing_extensions.TypedDict( + "RequestOptionalQueryParams", + { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + "order_by": typing.Union[OrderBySchema,], + }, + total=False, +) + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + +request_query_model_name = api_client.QueryParameter( + name="model_name", + style=api_client.ParameterStyle.FORM, + schema=ModelNameSchema, + explode=True, +) +request_query_order_by = api_client.QueryParameter( + name="order_by", + style=api_client.ParameterStyle.FORM, + schema=OrderBySchema, + explode=True, +) +SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV2Response + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ("application/json",) + +class BaseApi(api_client.Api): + @typing.overload + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def _list_model_bundles_v2_model_bundles_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List Model Bundles + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_model_name, + request_query_order_by, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method="get".upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + +class ListModelBundlesV2ModelBundlesGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_model_bundles_v2_model_bundles_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def list_model_bundles_v2_model_bundles_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def list_model_bundles_v2_model_bundles_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def list_model_bundles_v2_model_bundles_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_model_bundles_v2_model_bundles_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_model_bundles_v2_model_bundles_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles/post.py b/launch/api_client/paths/v2_model_bundles/post.py new file mode 100644 index 00000000..75a2ecd2 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles/post.py @@ -0,0 +1,334 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_model_bundle_v2_request import ( + CreateModelBundleV2Request, +) +from launch.api_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) +from launch.api_client.model.http_validation_error import HTTPValidationError + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = CreateModelBundleV2Request + + +request_body_create_model_bundle_v2_request = api_client.RequestBody( + content={ + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + "HTTPBasic", +] +SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + "200": _response_for_200, + "422": _response_for_422, +} +_all_accept_content_types = ("application/json",) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create Model Bundle + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) + _fields = None + _body = None + serialized_data = request_body_create_model_bundle_v2_request.serialize(body, content_type) + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] + response = self.api_client.call_api( + resource_path=used_path, + method="post".upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + + +class CreateModelBundleV2ModelBundlesPost(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_model_bundle_v2_model_bundles_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_model_bundle_v2_model_bundles_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles/post.pyi b/launch/api_client/paths/v2_model_bundles/post.pyi new file mode 100644 index 00000000..d0eaf62f --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles/post.pyi @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from launch_client.model.create_model_bundle_v2_request import ( + CreateModelBundleV2Request, +) +from launch_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) +from launch_client.model.http_validation_error import HTTPValidationError +from urllib3._collections import HTTPHeaderDict + +# body param +SchemaForRequestBodyApplicationJson = CreateModelBundleV2Request + +request_body_create_model_bundle_v2_request = api_client.RequestBody( + content={ + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ("application/json",) + +class BaseApi(api_client.Api): + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def _create_model_bundle_v2_model_bundles_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create Model Bundle + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) + _fields = None + _body = None + serialized_data = request_body_create_model_bundle_v2_request.serialize(body, content_type) + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] + response = self.api_client.call_api( + resource_path=used_path, + method="post".upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + +class CreateModelBundleV2ModelBundlesPost(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def create_model_bundle_v2_model_bundles_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_model_bundle_v2_model_bundles_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_model_bundle_v2_model_bundles_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py new file mode 100644 index 00000000..1a69800e --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from launch.api_client.paths.v2_model_bundles_clone_with_changes import Api + +from launch.api_client.paths import PathValues + +path = PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py new file mode 100644 index 00000000..59c29b33 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py @@ -0,0 +1,334 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.clone_model_bundle_v2_request import ( + CloneModelBundleV2Request, +) +from launch.api_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) +from launch.api_client.model.http_validation_error import HTTPValidationError + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = CloneModelBundleV2Request + + +request_body_clone_model_bundle_v2_request = api_client.RequestBody( + content={ + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + "HTTPBasic", +] +SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + "200": _response_for_200, + "422": _response_for_422, +} +_all_accept_content_types = ("application/json",) + + +class BaseApi(api_client.Api): + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Clone Model Bundle With Changes + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) + _fields = None + _body = None + serialized_data = request_body_clone_model_bundle_v2_request.serialize(body, content_type) + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] + response = self.api_client.call_api( + resource_path=used_path, + method="post".upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + + +class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi new file mode 100644 index 00000000..498ec820 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from launch_client.model.clone_model_bundle_v2_request import ( + CloneModelBundleV2Request, +) +from launch_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) +from launch_client.model.http_validation_error import HTTPValidationError +from urllib3._collections import HTTPHeaderDict + +# body param +SchemaForRequestBodyApplicationJson = CloneModelBundleV2Request + +request_body_clone_model_bundle_v2_request = api_client.RequestBody( + content={ + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ("application/json",) + +class BaseApi(api_client.Api): + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Clone Model Bundle With Changes + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) + _fields = None + _body = None + serialized_data = request_body_clone_model_bundle_v2_request.serialize(body, content_type) + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] + response = self.api_client.call_api( + resource_path=used_path, + method="post".upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + +class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = "application/json", + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles_latest/__init__.py b/launch/api_client/paths/v2_model_bundles_latest/__init__.py new file mode 100644 index 00000000..b8ce06cc --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_latest/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from launch.api_client.paths.v2_model_bundles_latest import Api + +from launch.api_client.paths import PathValues + +path = PathValues.V2_MODELBUNDLES_LATEST diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.py b/launch/api_client/paths/v2_model_bundles_latest/get.py new file mode 100644 index 00000000..bcb75db6 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_latest/get.py @@ -0,0 +1,294 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) + +from . import path + +# Query params +ModelNameSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + "RequestRequiredQueryParams", + { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + }, +) +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_model_name = api_client.QueryParameter( + name="model_name", + style=api_client.ParameterStyle.FORM, + schema=ModelNameSchema, + required=True, + explode=True, +) +_auth = [ + "HTTPBasic", +] +SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + "200": _response_for_200, + "422": _response_for_422, +} +_all_accept_content_types = ("application/json",) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get Latest Model Bundle + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in (request_query_model_name,): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method="get".upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + + +class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.pyi b/launch/api_client/paths/v2_model_bundles_latest/get.pyi new file mode 100644 index 00000000..edd6dda8 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_latest/get.pyi @@ -0,0 +1,255 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.model_bundle_v2_response import ModelBundleV2Response +from urllib3._collections import HTTPHeaderDict + +# Query params +ModelNameSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + "RequestRequiredQueryParams", + { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + }, +) +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + +request_query_model_name = api_client.QueryParameter( + name="model_name", + style=api_client.ParameterStyle.FORM, + schema=ModelNameSchema, + required=True, + explode=True, +) +SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ("application/json",) + +class BaseApi(api_client.Api): + @typing.overload + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get Latest Model Bundle + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in (request_query_model_name,): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method="get".upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + +class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def get_latest_model_bundle_v2_model_bundles_latest_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_latest_model_bundle_v2_model_bundles_latest_get_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py new file mode 100644 index 00000000..df3c2a79 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from launch.api_client.paths.v2_model_bundles_model_bundle_id import Api + +from launch.api_client.paths import PathValues + +path = PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py new file mode 100644 index 00000000..729ad8c1 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) + +from . import path + +# Path params +ModelBundleIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + "RequestRequiredPathParams", + { + "model_bundle_id": typing.Union[ + ModelBundleIdSchema, + str, + ], + }, +) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_model_bundle_id = api_client.PathParameter( + name="model_bundle_id", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelBundleIdSchema, + required=True, +) +_auth = [ + "HTTPBasic", +] +SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + "200": _response_for_200, + "422": _response_for_422, +} +_all_accept_content_types = ("application/json",) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get Model Bundle + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in (request_path_model_bundle_id,): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace("{%s}" % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method="get".upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + + +class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: + ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: + ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi new file mode 100644 index 00000000..fedb2333 --- /dev/null +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi @@ -0,0 +1,254 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 + +import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.model_bundle_v2_response import ModelBundleV2Response +from urllib3._collections import HTTPHeaderDict + +# Path params +ModelBundleIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + "RequestRequiredPathParams", + { + "model_bundle_id": typing.Union[ + ModelBundleIdSchema, + str, + ], + }, +) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + +request_path_model_bundle_id = api_client.PathParameter( + name="model_bundle_id", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelBundleIdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + +@dataclass +class ApiResponseFor422(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + headers: schemas.Unset = schemas.unset + +_response_for_422 = api_client.OpenApiResponse( + response_cls=ApiResponseFor422, + content={ + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ("application/json",) + +class BaseApi(api_client.Api): + @typing.overload + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get Model Bundle + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in (request_path_model_bundle_id,): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace("{%s}" % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add("Accept", accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method="get".upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + + return api_response + +class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def get_model_bundle_v2_model_bundles_model_bundle_id_get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ApiResponseFor200,]: ... + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization, + ) diff --git a/launch/client.py b/launch/client.py index 190e5e5c..85ac3c0f 100644 --- a/launch/client.py +++ b/launch/client.py @@ -18,26 +18,28 @@ from launch.api_client import ApiClient, Configuration from launch.api_client.apis.tags.default_api import DefaultApi from launch.api_client.model.callback_auth import CallbackAuth -from launch.api_client.model.clone_model_bundle_request import ( - CloneModelBundleRequest, +from launch.api_client.model.clone_model_bundle_v1_request import ( + CloneModelBundleV1Request, ) -from launch.api_client.model.create_batch_job_request import ( - CreateBatchJobRequest, +from launch.api_client.model.create_batch_job_v1_request import ( + CreateBatchJobV1Request, ) -from launch.api_client.model.create_model_bundle_request import ( - CreateModelBundleRequest, +from launch.api_client.model.create_model_bundle_v1_request import ( + CreateModelBundleV1Request, ) from launch.api_client.model.create_model_endpoint_v1_request import ( CreateModelEndpointV1Request, ) -from launch.api_client.model.endpoint_predict_request import ( - EndpointPredictRequest, +from launch.api_client.model.endpoint_predict_v1_request import ( + EndpointPredictV1Request, ) from launch.api_client.model.gpu_type import GpuType from launch.api_client.model.model_bundle_environment_params import ( ModelBundleEnvironmentParams, ) -from launch.api_client.model.model_bundle_framework import ModelBundleFramework +from launch.api_client.model.model_bundle_framework_type import ( + ModelBundleFrameworkType, +) from launch.api_client.model.model_bundle_packaging_type import ( ModelBundlePackagingType, ) @@ -384,7 +386,7 @@ def create_model_bundle_from_dirs( with ApiClient(self.configuration) as api_client: api_instance = DefaultApi(api_client) - framework = ModelBundleFramework(env_params["framework_type"]) + framework = ModelBundleFrameworkType(env_params["framework_type"]) env_params_copy = env_params.copy() env_params_copy["framework_type"] = framework # type: ignore env_params_obj = ModelBundleEnvironmentParams(**env_params_copy) # type: ignore @@ -398,7 +400,7 @@ def create_model_bundle_from_dirs( app_config=payload.get("app_config"), schema_location=schema_location, ) - create_model_bundle_request = CreateModelBundleRequest(**payload) # type: ignore + create_model_bundle_request = CreateModelBundleV1Request(**payload) # type: ignore api_instance.create_model_bundle_v1_model_bundles_post( body=create_model_bundle_request, skip_deserialization=True, @@ -583,7 +585,7 @@ def create_model_bundle( # pylint: disable=too-many-statements ) _add_app_config_to_bundle_create_payload(payload, app_config) - framework = ModelBundleFramework(env_params["framework_type"]) + framework = ModelBundleFrameworkType(env_params["framework_type"]) env_params_copy = env_params.copy() env_params_copy["framework_type"] = framework # type: ignore env_params_obj = ModelBundleEnvironmentParams(**env_params_copy) # type: ignore @@ -600,7 +602,7 @@ def create_model_bundle( # pylint: disable=too-many-statements app_config=app_config, schema_location=schema_location, ) - create_model_bundle_request = CreateModelBundleRequest(**payload) # type: ignore + create_model_bundle_request = CreateModelBundleV1Request(**payload) # type: ignore api_instance.create_model_bundle_v1_model_bundles_post( body=create_model_bundle_request, skip_deserialization=True, @@ -1069,7 +1071,7 @@ def clone_model_bundle_with_changes( original_model_bundle_id=bundle_id, new_app_config=app_config, ) - clone_model_bundle_request = CloneModelBundleRequest(**payload) + clone_model_bundle_request = CloneModelBundleV1Request(**payload) response = ( api_instance.clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( # noqa: E501 body=clone_model_bundle_request, @@ -1186,7 +1188,7 @@ def _sync_request( with ApiClient(self.configuration) as api_client: api_instance = DefaultApi(api_client) payload = dict_not_none(return_pickled=return_pickled, url=url, args=args) - request = EndpointPredictRequest(**payload) + request = EndpointPredictV1Request(**payload) query_params = frozendict({"model_endpoint_id": endpoint_id}) response = api_instance.create_sync_inference_task_v1_sync_tasks_post( # type: ignore body=request, @@ -1286,7 +1288,7 @@ def _async_request( callback_url=callback_url, callback_auth=callback_auth, ) - request = EndpointPredictRequest(**payload) + request = EndpointPredictV1Request(**payload) model_endpoint_id = endpoint.model_endpoint.id # type: ignore query_params = frozendict({"model_endpoint_id": model_endpoint_id}) response = api_instance.create_async_inference_task_v1_async_tasks_post( # type: ignore @@ -1458,7 +1460,7 @@ def batch_async_request( labels=labels, resource_requests=resource_requests, ) - request = CreateBatchJobRequest(**payload) + request = CreateBatchJobV1Request(**payload) with ApiClient(self.configuration) as api_client: api_instance = DefaultApi(api_client) response = api_instance.create_batch_job_v1_batch_jobs_post( # type: ignore diff --git a/tests/test_client.py b/tests/test_client.py index a82f8db3..49f55560 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -7,15 +7,10 @@ from zipfile import ZipFile import pytest -import requests -import requests_mock from urllib3 import HTTPResponse import launch from launch.api_client.api_client import ApiResponseWithoutDeserialization -from launch.api_client.model.list_model_endpoints_response import ( - ListModelEndpointsResponse, -) def _get_mock_client():