code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_config.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1PredictorConfig): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_config.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1PredictorConfig): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_config.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_extension_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_extension_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1PredictorExtensionSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_extension_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_extension_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1PredictorExtensionSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_extension_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_extension_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_protocols.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_protocols.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1PredictorProtocols): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_protocols.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_protocols.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1PredictorProtocols): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_protocols.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_protocols.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1PredictorSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1PredictorSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_predictor_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_predictor_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_config.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1ResourceConfig): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_config.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1ResourceConfig): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_config.py
Apache-2.0
def name(self, name): """Sets the name of this V1beta1ResourceMetricSource. name is the name of the resource in question. # noqa: E501 :param name: The name of this V1beta1ResourceMetricSource. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_v...
Sets the name of this V1beta1ResourceMetricSource. name is the name of the resource in question. # noqa: E501 :param name: The name of this V1beta1ResourceMetricSource. # noqa: E501 :type: str
name
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_metric_source.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_metric_source.py
Apache-2.0
def target(self, target): """Sets the target of this V1beta1ResourceMetricSource. :param target: The target of this V1beta1ResourceMetricSource. # noqa: E501 :type: V1beta1MetricTarget """ if self.local_vars_configuration.client_side_validation and target is None: # noqa: E50...
Sets the target of this V1beta1ResourceMetricSource. :param target: The target of this V1beta1ResourceMetricSource. # noqa: E501 :type: V1beta1MetricTarget
target
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_metric_source.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_metric_source.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_metric_source.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_metric_source.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1ResourceMetricSource): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_metric_source.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_metric_source.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1ResourceMetricSource): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_resource_metric_source.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_resource_metric_source.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_scaler_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_scaler_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1ScalerSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_scaler_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_scaler_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1ScalerSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_scaler_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_scaler_spec.py
Apache-2.0
def auto_mount_service_account_token(self, auto_mount_service_account_token): """Sets the auto_mount_service_account_token of this V1beta1SecurityConfig. :param auto_mount_service_account_token: The auto_mount_service_account_token of this V1beta1SecurityConfig. # noqa: E501 :type: bool ...
Sets the auto_mount_service_account_token of this V1beta1SecurityConfig. :param auto_mount_service_account_token: The auto_mount_service_account_token of this V1beta1SecurityConfig. # noqa: E501 :type: bool
auto_mount_service_account_token
python
kserve/kserve
python/kserve/kserve/models/v1beta1_security_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_security_config.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_security_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_security_config.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1SecurityConfig): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_security_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_security_config.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1SecurityConfig): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_security_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_security_config.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_service_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_service_config.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1ServiceConfig): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_service_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_service_config.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1ServiceConfig): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_service_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_service_config.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_sk_learn_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_sk_learn_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1SKLearnSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_sk_learn_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_sk_learn_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1SKLearnSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_sk_learn_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_sk_learn_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_storage_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_storage_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1StorageSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_storage_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_storage_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1StorageSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_storage_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_storage_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_tf_serving_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_tf_serving_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1TFServingSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_tf_serving_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_tf_serving_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1TFServingSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_tf_serving_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_tf_serving_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_torch_serve_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_torch_serve_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1TorchServeSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_torch_serve_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_torch_serve_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1TorchServeSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_torch_serve_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_torch_serve_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformers_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformers_config.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1TransformersConfig): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformers_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformers_config.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1TransformersConfig): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformers_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformers_config.py
Apache-2.0
def default_image_version(self, default_image_version): """Sets the default_image_version of this V1beta1TransformerConfig. default transformer docker image version # noqa: E501 :param default_image_version: The default_image_version of this V1beta1TransformerConfig. # noqa: E501 :ty...
Sets the default_image_version of this V1beta1TransformerConfig. default transformer docker image version # noqa: E501 :param default_image_version: The default_image_version of this V1beta1TransformerConfig. # noqa: E501 :type: str
default_image_version
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_config.py
Apache-2.0
def image(self, image): """Sets the image of this V1beta1TransformerConfig. transformer docker image name # noqa: E501 :param image: The image of this V1beta1TransformerConfig. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and ima...
Sets the image of this V1beta1TransformerConfig. transformer docker image name # noqa: E501 :param image: The image of this V1beta1TransformerConfig. # noqa: E501 :type: str
image
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_config.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_config.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1TransformerConfig): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_config.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1TransformerConfig): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_config.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_config.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1TransformerSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1TransformerSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_transformer_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_transformer_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_triton_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_triton_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1TritonSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_triton_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_triton_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1TritonSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_triton_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_triton_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_worker_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_worker_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1WorkerSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_worker_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_worker_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1WorkerSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_worker_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_worker_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1beta1_xg_boost_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_xg_boost_spec.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1beta1XGBoostSpec): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_xg_boost_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_xg_boost_spec.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1beta1XGBoostSpec): return True return self.to_dict() != other.to_dict()
Returns true if both objects are not equal
__ne__
python
kserve/kserve
python/kserve/kserve/models/v1beta1_xg_boost_spec.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1beta1_xg_boost_spec.py
Apache-2.0
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if has...
Returns the model properties as a dict
to_dict
python
kserve/kserve
python/kserve/kserve/models/v1_time.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1_time.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1Time): return False return self.__dict__ == other.__dict__
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/v1_time.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/v1_time.py
Apache-2.0
async def get_model(self, name: str) -> BaseKServeModel: """Get the model instance with the given name. Args: name (str): Model name. Returns: ModelHandleType: Instance of the model. """ model = self._model_registry.get_model(name) if model is No...
Get the model instance with the given name. Args: name (str): Model name. Returns: ModelHandleType: Instance of the model.
get_model
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
def get_binary_cloudevent( body: Union[str, bytes, None], headers: Dict[str, str] ) -> CloudEvent: """Helper function to parse CloudEvent body and headers. Args: body (str|bytes|None): Request body. headers (Dict[str, str]): Request headers. Returns: ...
Helper function to parse CloudEvent body and headers. Args: body (str|bytes|None): Request body. headers (Dict[str, str]): Request headers. Returns: CloudEvent: A CloudEvent instance parsed from http body and headers. Raises: InvalidInput: An er...
get_binary_cloudevent
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
async def live() -> Dict[str, str]: """Server live. Returns ``{"status": "alive"}`` on successful invocation. Primarily meant to be used for Kubernetes liveness check. Returns: Dict: {"status": "alive"} """ return {"status": "alive"}
Server live. Returns ``{"status": "alive"}`` on successful invocation. Primarily meant to be used for Kubernetes liveness check. Returns: Dict: {"status": "alive"}
live
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
def metadata(self) -> Dict: """Server metadata. Note: Supports ``model_repository_extension`` as defined at Triton Server `Model Repository Extension`_. Returns: Returns a dict object with following fields: - name (str): name of the server. ...
Server metadata. Note: Supports ``model_repository_extension`` as defined at Triton Server `Model Repository Extension`_. Returns: Returns a dict object with following fields: - name (str): name of the server. - version (str): server version numb...
metadata
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
async def model_metadata(self, model_name: str) -> Dict: """Get metadata for a specific model. Args: model_name (str): Model name Returns: Dict: dictionary with following fields: - name (str): name of the model - platform: "" (Empty Stri...
Get metadata for a specific model. Args: model_name (str): Model name Returns: Dict: dictionary with following fields: - name (str): name of the model - platform: "" (Empty String) - inputs: Dict with below fields ...
model_metadata
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
async def ready(self) -> bool: """Server ready. Returns ``True``. Primarily meant to be used as Kubernetes readiness check. Returns: bool: True """ # If predictor host is present, then it means this is a transformer, # We should also need to check the predic...
Server ready. Returns ``True``. Primarily meant to be used as Kubernetes readiness check. Returns: bool: True
ready
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
async def model_ready( self, model_name: str, disable_predictor_health_check: bool = False ) -> bool: """Check if a model is ready. Args: model_name (str): name of the model disable_predictor_health_check (bool): Flag to disable predictor health check for...
Check if a model is ready. Args: model_name (str): name of the model disable_predictor_health_check (bool): Flag to disable predictor health check for infer/predict requests. Returns: bool: True if the model is ready, False otherwise. Raises: ...
model_ready
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
async def infer( self, model_name: str, request: Union[Dict, InferRequest], headers: Optional[Dict[str, str]] = None, ) -> Tuple[Union[Dict, InferResponse], Dict[str, str]]: """Performs inference on the specified model with the provided body and headers. If the ``bod...
Performs inference on the specified model with the provided body and headers. If the ``body`` contains an encoded `CloudEvent`_, then it will be decoded and processed. The response body/headers will also be encoded as CloudEvents. Args: model_name (str): Model name. req...
infer
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
async def explain( self, model_name: str, request: Union[bytes, Dict, InferRequest], headers: Optional[Dict[str, str]] = None, ) -> Tuple[Union[str, bytes, Dict, InferResponse], Dict[str, str]]: """Performs explanation for the specified model. Args: model...
Performs explanation for the specified model. Args: model_name (str): Model name to be used for explanation. request (bytes|Dict): Request body data. headers: (Optional[Dict[str, str]]): Request headers. Returns: Dict: Explanation result. Raises...
explain
python
kserve/kserve
python/kserve/kserve/protocol/dataplane.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/dataplane.py
Apache-2.0
def serialize_byte_tensor(input_tensor: np.ndarray) -> np.ndarray: """ Serializes a bytes tensor into a flat numpy array of length prepended bytes. The numpy array should use dtype of np.object. For np.bytes, numpy will remove trailing zeros at the end of byte sequence and because of this it should ...
Serializes a bytes tensor into a flat numpy array of length prepended bytes. The numpy array should use dtype of np.object. For np.bytes, numpy will remove trailing zeros at the end of byte sequence and because of this it should be avoided. Args: input_tensor : np.array The byt...
serialize_byte_tensor
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def deserialize_bytes_tensor(encoded_tensor: bytes) -> np.ndarray: """ Deserializes an encoded bytes tensor into a numpy array of dtype of python objects Args: encoded_tensor : bytes The encoded bytes tensor where each element has its length in first 4 bytes followed by ...
Deserializes an encoded bytes tensor into a numpy array of dtype of python objects Args: encoded_tensor : bytes The encoded bytes tensor where each element has its length in first 4 bytes followed by the content Returns: string_tensor : np.array ...
deserialize_bytes_tensor
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def parameters( self, params: Optional[Union[Dict, MessageMap[str, InferParameter]]] ): """Set the parameters of the inference input associated with this object. Args: params: parameters of the inference input """ self._parameters = params
Set the parameters of the inference input associated with this object. Args: params: parameters of the inference input
parameters
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def as_string(self) -> List[List[str]]: """ Decodes the inference input data as a list of strings. Returns: List[List[str]]: The decoded data as a list of strings. Raises: InvalidInput: If the datatype of the inference input is not 'BYTES'. """ i...
Decodes the inference input data as a list of strings. Returns: List[List[str]]: The decoded data as a list of strings. Raises: InvalidInput: If the datatype of the inference input is not 'BYTES'.
as_string
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def as_numpy(self) -> np.ndarray: """Decode the inference input data as numpy array. Returns: A numpy array of the inference input data Raises: InvalidInput: If the datatype of the inference input is not recognized. """ dtype = to_np_dtype(self.datatype) ...
Decode the inference input data as numpy array. Returns: A numpy array of the inference input data Raises: InvalidInput: If the datatype of the inference input is not recognized.
as_numpy
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def set_data_from_numpy(self, input_tensor: np.ndarray, binary_data: bool = True): """Set the tensor data from the specified numpy array for input associated with this object. Args: input_tensor : The tensor data in numpy array format. binary_data : Indicates whether to set data...
Set the tensor data from the specified numpy array for input associated with this object. Args: input_tensor : The tensor data in numpy array format. binary_data : Indicates whether to set data for the input in binary format or explicit tensor within JSON. The ...
set_data_from_numpy
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def __init__(self, name: str, parameters: Optional[Dict] = None): """ The RequestedOutput class represents an output that is requested as part of an inference request. Args: name (str): The name of the output. parameters (Optional[Dict]): Additional parameters for the ou...
The RequestedOutput class represents an output that is requested as part of an inference request. Args: name (str): The name of the output. parameters (Optional[Dict]): Additional parameters for the output.
__init__
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def parameters( self, params: Optional[Union[Dict, MessageMap[str, InferParameter]]] ): """Set the parameters of the inference input associated with this object. Args: params: parameters of the inference input """ self._parameters = params
Set the parameters of the inference input associated with this object. Args: params: parameters of the inference input
parameters
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def binary_data(self) -> Optional[bool]: """Get the binary_data attribute from the parameters. This attribute indicates whether the data for the input should be in binary format. Returns: bool or None: True if the data should be in binary format, False otherwise. ...
Get the binary_data attribute from the parameters. This attribute indicates whether the data for the input should be in binary format. Returns: bool or None: True if the data should be in binary format, False otherwise. If the binary_data attribute is not set, ...
binary_data
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def __init__( self, model_name: str, infer_inputs: List[InferInput], request_id: Optional[str] = None, raw_inputs=None, from_grpc: Optional[bool] = False, parameters: Optional[Union[Dict, MessageMap[str, InferParameter]]] = None, request_outputs: Optional[...
InferRequest Data Model. Args: model_name: The model name. infer_inputs: The inference inputs for the model. request_id: The id for the inference request. raw_inputs: The binary data for the inference inputs. from_grpc: Indicate if the data model is c...
__init__
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def use_binary_outputs(self) -> bool: """This attribute is used to determine if all the outputs should be returned as raw binary format. For REST, Get the binary_data_output attribute from the parameters. This will be ovverided by the individual output's 'binary_data' parameter. For ...
This attribute is used to determine if all the outputs should be returned as raw binary format. For REST, Get the binary_data_output attribute from the parameters. This will be ovverided by the individual output's 'binary_data' parameter. For GRPC, It is True, if the received inp...
use_binary_outputs
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def from_grpc(cls, request: ModelInferRequest) -> "InferRequest": """ Class method to construct an InferRequest object from a ModelInferRequest object. Args: request (ModelInferRequest): The gRPC ModelInferRequest object to be converted. Returns: InferRequest: T...
Class method to construct an InferRequest object from a ModelInferRequest object. Args: request (ModelInferRequest): The gRPC ModelInferRequest object to be converted. Returns: InferRequest: The resulting InferRequest object.
from_grpc
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def from_bytes( cls, req_bytes: bytes, json_length: int, model_name: str ) -> "InferRequest": """The class method to construct the InferRequest object from REST raw request bytes. Args: req_bytes (bytes): The raw InferRequest in bytes. json_length (int): The length o...
The class method to construct the InferRequest object from REST raw request bytes. Args: req_bytes (bytes): The raw InferRequest in bytes. json_length (int): The length of the json bytes. model_name (str): The name of the model. Returns: InferRequest: Th...
from_bytes
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def from_inference_request( cls, request: InferenceRequest, model_name: str ) -> "InferRequest": """The class method to construct the InferRequest object from InferenceRequest object. Args: request (InferenceRequest): The InferenceRequest object. model_name (str): Th...
The class method to construct the InferRequest object from InferenceRequest object. Args: request (InferenceRequest): The InferenceRequest object. model_name (str): The name of the model. Returns: InferRequest: The resulting InferRequest object. Raises: ...
from_inference_request
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def to_rest(self) -> Tuple[Union[bytes, Dict], Optional[int]]: """ Converts the InferRequest object to v2 REST InferRequest Dict or bytes. This method is used to convert the InferRequest object into a format that can be sent over a REST API. Returns: Tuple[Union[bytes, Dict]...
Converts the InferRequest object to v2 REST InferRequest Dict or bytes. This method is used to convert the InferRequest object into a format that can be sent over a REST API. Returns: Tuple[Union[bytes, Dict], Optional[int]]: A tuple containing the InferRequest in bytes or Dict and...
to_rest
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def to_grpc(self) -> ModelInferRequest: """Converts the InferRequest object to gRPC ModelInferRequest type. Returns: ModelInferRequest gRPC type converted from InferRequest object. """ infer_inputs = [] raw_input_contents = [] for infer_input in self.inputs: ...
Converts the InferRequest object to gRPC ModelInferRequest type. Returns: ModelInferRequest gRPC type converted from InferRequest object.
to_grpc
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def as_dataframe(self) -> pd.DataFrame: """Decode the tensor inputs as pandas dataframe. Returns: The inference input data as pandas dataframe """ dfs = [] for input in self.inputs: input_data = input.data if input.datatype == "BYTES": ...
Decode the tensor inputs as pandas dataframe. Returns: The inference input data as pandas dataframe
as_dataframe
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def get_input_by_name(self, name: str) -> Optional[InferInput]: """Find an input Tensor in the InferenceRequest that has the given name Args: name : str name of the input Tensor object Returns: InferInput The InferInput with the specified n...
Find an input Tensor in the InferenceRequest that has the given name Args: name : str name of the input Tensor object Returns: InferInput The InferInput with the specified name, or None if no input with this name exists
get_input_by_name
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def __init__( self, name: str, shape: List[int], datatype: str, data: Union[List, np.ndarray, InferTensorContents] = None, parameters: Optional[Union[Dict, MessageMap[str, InferParameter]]] = None, ): """An object of InferOutput class is used to describe the o...
An object of InferOutput class is used to describe the output tensor for an inference response. Args: name : The name of inference output whose data will be described by this object. shape : The shape of the associated inference output. datatype : The data type of the associ...
__init__
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def as_numpy(self) -> np.ndarray: """Decode the tensor output data as numpy array. Returns: The numpy array of the associated inference output data. """ dtype = to_np_dtype(self.datatype) if dtype is None: raise InvalidInput("invalid datatype in the input...
Decode the tensor output data as numpy array. Returns: The numpy array of the associated inference output data.
as_numpy
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def set_data_from_numpy(self, output_tensor: np.ndarray, binary_data: bool = True): """Set the tensor data from the specified numpy array for the inference output associated with this object. Args: output_tensor : The tensor data in numpy array format. binary_data : Indicates wh...
Set the tensor data from the specified numpy array for the inference output associated with this object. Args: output_tensor : The tensor data in numpy array format. binary_data : Indicates whether to set data for the input in binary format or explicit tensor w...
set_data_from_numpy
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def __init__( self, response_id: str, model_name: str, infer_outputs: List[InferOutput], model_version: Optional[str] = None, raw_outputs=None, from_grpc: Optional[bool] = False, parameters: Optional[Union[Dict, MessageMap[str, InferParameter]]] = None, ...
The InferResponse Data Model Args: response_id: The id of the inference response. model_name: The name of the model. infer_outputs: The inference outputs of the inference response. model_version: The version of the model. raw_outputs: The raw binary d...
__init__
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def from_grpc(cls, response: ModelInferResponse) -> "InferResponse": """The class method to construct the InferResponse object from gRPC message type. Args: response: The GRPC response as ModelInferResponse object. Returns: InferResponse object. """ infer...
The class method to construct the InferResponse object from gRPC message type. Args: response: The GRPC response as ModelInferResponse object. Returns: InferResponse object.
from_grpc
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def from_rest(cls, response: Dict) -> "InferResponse": """The class method to construct the InferResponse object from REST message type. Args: response: The response as a dict. Returns: InferResponse object. """ infer_outputs = [ InferOutput( ...
The class method to construct the InferResponse object from REST message type. Args: response: The response as a dict. Returns: InferResponse object.
from_rest
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def from_bytes( cls, res_bytes: bytes, json_length: int, ) -> "InferResponse": """ Class method to construct an InferResponse object from raw response bytes. This method is used to convert the raw response bytes received from a REST API into an InferResponse object. ...
Class method to construct an InferResponse object from raw response bytes. This method is used to convert the raw response bytes received from a REST API into an InferResponse object. Args: res_bytes (bytes): The raw response bytes received from the REST API. json_lengt...
from_bytes
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def to_rest(self) -> Tuple[Union[bytes, Dict], Optional[int]]: """ Converts the InferResponse object to v2 REST InferResponse Dict or bytes. This method is used to convert the InferResponse object into a format that can be sent over a REST API. Returns: Tuple[Union[bytes, Di...
Converts the InferResponse object to v2 REST InferResponse Dict or bytes. This method is used to convert the InferResponse object into a format that can be sent over a REST API. Returns: Tuple[Union[bytes, Dict], Optional[int]]: A tuple containing the InferResponse in bytes or Dict...
to_rest
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0
def to_grpc(self) -> ModelInferResponse: """Converts the InferResponse object to gRPC ModelInferResponse type. Returns: The ModelInferResponse gRPC message. Raises: InvalidInput: If the output data is not a List or if the datatype is invalid. """ infer_ou...
Converts the InferResponse object to gRPC ModelInferResponse type. Returns: The ModelInferResponse gRPC message. Raises: InvalidInput: If the output data is not a List or if the datatype is invalid.
to_grpc
python
kserve/kserve
python/kserve/kserve/protocol/infer_type.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/protocol/infer_type.py
Apache-2.0