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 deserialize(self, response, response_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. :return: deserialized object. """ ...
Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. :return: deserialized object.
deserialize
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def __deserialize(self, data, klass): """Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. :return: object. """ if data is None: return None if type(klass) == str: ...
Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. :return: object.
__deserialize
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, ...
Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. :param query_params: Quer...
call_api
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, ...
Makes the HTTP request using RESTClient.
request
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. :param params: Parameters as dict or list of two-tuples :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collection...
Get parameters as list of tuples, formatting collections. :param params: Parameters as dict or list of two-tuples :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted
parameters_to_tuples
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def files_parameters(self, files=None): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] if files: for k, v in six.iteritems(files): if not v: continue ...
Builds form parameters. :param files: File parameters. :return: Form parameters with files.
files_parameters
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def select_header_accept(self, accepts): """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: return accepts = [x.lower() for x in accepts] if 'appli...
Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json).
select_header_accept
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. :return: Content-Type (e.g. application/json). """ if not content_types: return 'application/json'...
Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. :return: Content-Type (e.g. application/json).
select_header_content_type
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def update_params_for_auth(self, headers, querys, auth_settings): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication sett...
Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list.
update_params_for_auth
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def __deserialize_file(self, response): """Deserializes body to file Saves response body into a file in a temporary folder, using the filename from the `Content-Disposition` header if provided. :param response: RESTResponse. :return: file path. """ fd, path = t...
Deserializes body to file Saves response body into a file in a temporary folder, using the filename from the `Content-Disposition` header if provided. :param response: RESTResponse. :return: file path.
__deserialize_file
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def __deserialize_date(self, string): """Deserializes string to date. :param string: str. :return: date. """ try: return parse(string).date() except ImportError: return string except ValueError: raise rest.ApiException( ...
Deserializes string to date. :param string: str. :return: date.
__deserialize_date
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. :param string: str. :return: datetime. """ try: return parse(string) except ImportError: return string ...
Deserializes string to datetime. The string should be in iso8601 datetime format. :param string: str. :return: datetime.
__deserialize_datetime
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def __deserialize_model(self, data, klass): """Deserializes list or dict to model. :param data: dict, list. :param klass: class literal. :return: model object. """ has_discriminator = False if (hasattr(klass, 'get_real_child_model') and klass.disc...
Deserializes list or dict to model. :param data: dict, list. :param klass: class literal. :return: model object.
__deserialize_model
python
kserve/kserve
python/kserve/kserve/api_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api_client.py
Apache-2.0
def get_default_copy(cls): """Return new instance of configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default configuration passed by the set_default method. :return: The configuration object. ...
Return new instance of configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default configuration passed by the set_default method. :return: The configuration object.
get_default_copy
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def logger_file(self, value): """The logger file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str """ self.__logger_file = value ...
The logger file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str
logger_file
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def debug(self, value): """Debug status :param value: The debug status, True or False. :type: bool """ self.__debug = value if self.__debug: # if debug status is True, turn on debug logging for _, logger in six.iteritems(self.logger): ...
Debug status :param value: The debug status, True or False. :type: bool
debug
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def logger_format(self, value): """The logger format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str """ self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format)
The logger format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str
logger_format
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def get_api_key_with_prefix(self, identifier): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) key ...
Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication.
get_api_key_with_prefix
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ username = "" if self.username is not None: username = self.username password = "" if self.password is not None: ...
Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication.
get_basic_auth_token
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def to_debug_report(self): """Gets the essential information for debugging. :return: The report for debugging. """ return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v0.1\n"\ ...
Gets the essential information for debugging. :return: The report for debugging.
to_debug_report
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def get_host_settings(self): """Gets an array of host settings :return: An array of host settings """ return [ { 'url': "/", 'description': "No description provided", } ]
Gets an array of host settings :return: An array of host settings
get_host_settings
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def get_host_from_settings(self, index, variables=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value :return: URL based on host settings """ variables = {} ...
Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value :return: URL based on host settings
get_host_from_settings
python
kserve/kserve
python/kserve/kserve/configuration.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/configuration.py
Apache-2.0
def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message Keyword Args: path_to_item (list) the path to the exception in the received_data dict. None if unset """ self.path_to_item = path_to_item full_...
Args: msg (str): the exception message Keyword Args: path_to_item (list) the path to the exception in the received_data dict. None if unset
__init__
python
kserve/kserve
python/kserve/kserve/exceptions.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/exceptions.py
Apache-2.0
def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message Keyword Args: path_to_item (None/list) the path to the exception in the received_data dict """ self.path_to_item = path_to_item full_msg = msg ...
Args: msg (str): the exception message Keyword Args: path_to_item (None/list) the path to the exception in the received_data dict
__init__
python
kserve/kserve
python/kserve/kserve/exceptions.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/exceptions.py
Apache-2.0
async def close(self): """ Close the client. Any future calls to server will result in an Error. """ await self._channel.close()
Close the client. Any future calls to server will result in an Error.
close
python
kserve/kserve
python/kserve/kserve/inference_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/inference_client.py
Apache-2.0
def _construct_url( self, base_url: Union[str, httpx.URL], relative_url: str ) -> httpx.URL: """ Merge a relative url argument together with any 'base_url' to create the URL used for the outgoing request. :param base_url: The base url as str or httpx.URL object to use when constructi...
Merge a relative url argument together with any 'base_url' to create the URL used for the outgoing request. :param base_url: The base url as str or httpx.URL object to use when constructing request url. :param relative_url: The relative url to use for merging with base url as string. :r...
_construct_url
python
kserve/kserve
python/kserve/kserve/inference_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/inference_client.py
Apache-2.0
async def explain( self, base_url: Union[httpx.URL, str], model_name: str, data: Dict, headers: Optional[Mapping[str, str]] = None, timeout: Union[float, None, tuple, httpx.Timeout] = httpx.USE_CLIENT_DEFAULT, ) -> Dict: """ Run asynchronous explanatio...
Run asynchronous explanation using the supplied data. :param base_url: Base url of the inference server. E.g. https://example.com:443, https://example.com:443/serving :param model_name: Name of the model as string. :param data: Input data as python dict. :param headers: (optiona...
explain
python
kserve/kserve
python/kserve/kserve/inference_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/inference_client.py
Apache-2.0
async def is_server_ready( self, base_url: Union[httpx.URL, str], headers: Optional[Mapping[str, str]] = None, timeout: Union[float, None, tuple, httpx.Timeout] = httpx.USE_CLIENT_DEFAULT, ) -> bool: """ Get readiness of the inference server. :param base_url: ...
Get readiness of the inference server. :param base_url: Base url of the inference server. E.g. https://example.com:443, https://example.com:443/serving :param headers: (optional) HTTP headers to include when sending request. :param timeout: (optional) The maximum end-to-end time, in sec...
is_server_ready
python
kserve/kserve
python/kserve/kserve/inference_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/inference_client.py
Apache-2.0
async def is_server_live( self, base_url: Union[str, httpx.URL], headers: Optional[Mapping[str, str]] = None, timeout: Union[float, None, tuple, httpx.Timeout] = httpx.USE_CLIENT_DEFAULT, ) -> bool: """ Get liveness of the inference server. :param base_url: Ba...
Get liveness of the inference server. :param base_url: Base url of the inference server. E.g. https://example.com:443, https://example.com:443/serving :param headers: (optional) HTTP headers to include when sending request. :param timeout: (optional) The maximum end-to-end time, in seco...
is_server_live
python
kserve/kserve
python/kserve/kserve/inference_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/inference_client.py
Apache-2.0
async def is_model_ready( self, base_url: Union[httpx.URL, str], model_name: str, headers: Optional[Mapping[str, str]] = None, timeout: Union[float, None, tuple, httpx.Timeout] = httpx.USE_CLIENT_DEFAULT, ) -> bool: """ Get readiness of the specified model. ...
Get readiness of the specified model. :param base_url: Base url of the inference server. E.g. https://example.com:443, https://example.com:443/serving :param model_name: Name of the model as string. :param headers: (optional) HTTP headers to include when sending request. :param ...
is_model_ready
python
kserve/kserve
python/kserve/kserve/inference_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/inference_client.py
Apache-2.0
async def close(self): """ Close the client, transport and proxies. """ await self._client.aclose()
Close the client, transport and proxies.
close
python
kserve/kserve
python/kserve/kserve/inference_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/inference_client.py
Apache-2.0
def configure_logging(log_config: Optional[Union[Dict, str]] = None): """ Configures Kserve and Uvicorn loggers. This function should be called before loading the model / starting the model server for consistent logging format. :param log_config: (Optional) File path or dict containing log config. ...
Configures Kserve and Uvicorn loggers. This function should be called before loading the model / starting the model server for consistent logging format. :param log_config: (Optional) File path or dict containing log config. If not provided default configuration will be used. If...
configure_logging
python
kserve/kserve
python/kserve/kserve/logging.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/logging.py
Apache-2.0
def __init__(self, name: str): """ Adds the required attributes Args: name: The name of the model. """ self.name = name self.ready = False self.engine = False
Adds the required attributes Args: name: The name of the model.
__init__
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
async def healthy(self) -> bool: """ Check the health of this model. By default returns `self.ready`. Returns: True if healthy, false otherwise """ return self.ready
Check the health of this model. By default returns `self.ready`. Returns: True if healthy, false otherwise
healthy
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
async def start_engine(self): """Certain models may require an engine to be started before they can be used""" self.ready = True
Certain models may require an engine to be started before they can be used
start_engine
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
def __init__( self, predictor_host: str, predictor_protocol: str = PredictorProtocol.REST_V1.value, predictor_use_ssl: bool = False, predictor_request_timeout_seconds: int = 600, predictor_request_retries: int = 0, predictor_health_check: bool = False, ): ...
The configuration for the http call to the predictor Args: predictor_host: The host name of the predictor predictor_protocol: The inference protocol used for predictor http call predictor_use_ssl: Enable using ssl for http connection to the predictor predictor_re...
__init__
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
def __init__( self, name: str, predictor_config: Optional[PredictorConfig] = None, return_response_headers: bool = False, ): """KServe Model Public Interface Model is intended to be subclassed to implement the model handlers. Args: name: The name...
KServe Model Public Interface Model is intended to be subclassed to implement the model handlers. Args: name: The name of the model. predictor_config: The configurations for http call to the predictor.
__init__
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
async def __call__( self, body: Union[Dict, CloudEvent, InferRequest], headers: Optional[Dict[str, str]] = None, verb: InferenceVerb = InferenceVerb.PREDICT, ) -> InferReturnType: """Method to call predictor or explainer with the given input. Args: body: ...
Method to call predictor or explainer with the given input. Args: body: Request body. verb: The inference verb for predict/generate/explain headers: Request headers. Returns: Response output from preprocess -> predict/generate/explain -> postprocess ...
__call__
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
async def postprocess( self, result: Union[Dict, InferResponse], headers: Dict[str, str] = None, response_headers: Dict[str, str] = None, ) -> Union[Dict, InferResponse]: """The `postprocess` handler can be overridden for inference result or response transformation. T...
The `postprocess` handler can be overridden for inference result or response transformation. The predictor sends back the inference result in `Dict` for v1 endpoints and `InferResponse` for v2 endpoints. Args: result: The inference result passed from `predict` handler or the HTTP response f...
postprocess
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
async def predict( self, payload: Union[Dict, InferRequest, ModelInferRequest], headers: Dict[str, str] = None, response_headers: Dict[str, str] = None, ) -> Union[Dict, InferResponse, AsyncIterator[Any]]: """The `predict` handler can be overridden for performing the inferenc...
The `predict` handler can be overridden for performing the inference. By default, the predict handler makes call to predictor for the inference step. Args: payload: Model inputs passed from `preprocess` handler. headers: Request headers. Returns: Inferen...
predict
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
async def explain(self, payload: Dict, headers: Dict[str, str] = None) -> Dict: """`explain` handler can be overridden to implement the model explanation. The default implementation makes call to the explainer if ``explainer_host`` is specified. Args: payload: Explainer model inputs...
`explain` handler can be overridden to implement the model explanation. The default implementation makes call to the explainer if ``explainer_host`` is specified. Args: payload: Explainer model inputs passed from preprocess handler. headers: Request headers. Returns: ...
explain
python
kserve/kserve
python/kserve/kserve/model.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model.py
Apache-2.0
def update(self, model: BaseKServeModel, name: Optional[str] = None): """ Update or add a model to the repository. Args: model (BaseKServeModel): The model to be added or updated in the repository. name (Optional[str], optional): The name to use for the model. ...
Update or add a model to the repository. Args: model (BaseKServeModel): The model to be added or updated in the repository. name (Optional[str], optional): The name to use for the model. If not provided, the model's own name attribute will be used. Defaults to No...
update
python
kserve/kserve
python/kserve/kserve/model_repository.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model_repository.py
Apache-2.0
def start(self, models: List[BaseKServeModel]) -> None: """Start the model server with a set of registered models. Args: models: a list of models to register to the model server. """ self._register_and_check_atleast_one_model_is_ready(models) if self.workers > 1: ...
Start the model server with a set of registered models. Args: models: a list of models to register to the model server.
start
python
kserve/kserve
python/kserve/kserve/model_server.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model_server.py
Apache-2.0
def stop(self, sig: int): """Stop the instances of REST and gRPC model servers. Args: sig: The signal to stop the server. """ async def shutdown(): await InferenceClientFactory().close() logger.info("Stopping the model server") if self._r...
Stop the instances of REST and gRPC model servers. Args: sig: The signal to stop the server.
stop
python
kserve/kserve
python/kserve/kserve/model_server.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model_server.py
Apache-2.0
def register_exception_handler( self, handler: Callable[[asyncio.events.AbstractEventLoop, Dict[str, Any]], None], ): """Add a custom handler as the event loop exception handler. If a handler is not provided, the default exception handler will be set. handler should be a ca...
Add a custom handler as the event loop exception handler. If a handler is not provided, the default exception handler will be set. handler should be a callable object, it should have a signature matching '(loop, context)', where 'loop' will be a reference to the active event loop, 'context' wi...
register_exception_handler
python
kserve/kserve
python/kserve/kserve/model_server.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model_server.py
Apache-2.0
def default_exception_handler( self, loop: asyncio.events.AbstractEventLoop, context: Dict[str, Any] ): """Default exception handler for event loop. This is called when an exception occurs and no exception handler is set. This can be called by a custom exception handler that wants t...
Default exception handler for event loop. This is called when an exception occurs and no exception handler is set. This can be called by a custom exception handler that wants to defer to the default handler behavior.
default_exception_handler
python
kserve/kserve
python/kserve/kserve/model_server.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model_server.py
Apache-2.0
def register_model(self, model: BaseKServeModel, name: Optional[str] = None): """Register a model to the model server. Args: model: The model object. name: The name of the model. If not provided, the model's name will be used. This can be used to provide addition...
Register a model to the model server. Args: model: The model object. name: The name of the model. If not provided, the model's name will be used. This can be used to provide additional names for the same model.
register_model
python
kserve/kserve
python/kserve/kserve/model_server.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/model_server.py
Apache-2.0
def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query par...
Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, ...
request
python
kserve/kserve
python/kserve/kserve/rest.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/rest.py
Apache-2.0
def set_gcs_credentials(namespace, credentials_file, service_account): """ Set GCS Credentials (secret and service account) with credentials file. Args: namespace(str): The kubernetes namespace. credentials_file(str): The path for the gcs credentials file. service_account(str): The n...
Set GCS Credentials (secret and service account) with credentials file. Args: namespace(str): The kubernetes namespace. credentials_file(str): The path for the gcs credentials file. service_account(str): The name of service account. If the service_account i...
set_gcs_credentials
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def set_s3_credentials( namespace, credentials_file, service_account, s3_profile="default", # pylint: disable=too-many-locals,too-many-arguments s3_endpoint=None, s3_region=None, s3_use_https=None, s3_verify_ssl=None, s3_cabundle=None, ): # pylint: disable=unused-argument """ ...
Set S3 Credentials (secret and service account). Args: namespace(str): The kubernetes namespace. credentials_file(str): The path for the S3 credentials file. s3_profile(str): The profile for S3, default value is 'default'. service_account(str): The name of service account(Option...
set_s3_credentials
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def set_azure_credentials(namespace, credentials_file, service_account): """ Set Azure Credentials (secret and service account) with credentials file. Args: namespace(str): The kubernetes namespace. credentials_file(str): The path for the Azure credentials file. service_account(str):...
Set Azure Credentials (secret and service account) with credentials file. Args: namespace(str): The kubernetes namespace. credentials_file(str): The path for the Azure credentials file. service_account(str): The name of service account. If the service_account ...
set_azure_credentials
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def create_secret(namespace, annotations=None, data=None, string_data=None): "Create namespaced secret, and return the secret name." try: created_secret = client.CoreV1Api().create_namespaced_secret( namespace, client.V1Secret( api_version="v1", ki...
Create namespaced secret, and return the secret name.
create_secret
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def set_service_account(namespace, service_account, secret_name): """ Set service account, create if service_account does not exist, otherwise patch it. """ if check_sa_exists(namespace=namespace, service_account=service_account): patch_service_account( secret_name=secret_name, names...
Set service account, create if service_account does not exist, otherwise patch it.
set_service_account
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def check_sa_exists(namespace, service_account): """ Check if the specified service account existing. """ sa_list = client.CoreV1Api().list_namespaced_service_account(namespace=namespace) sa_name_list = [sa.metadata.name for sa in sa_list.items] if service_account in sa_name_list: retu...
Check if the specified service account existing.
check_sa_exists
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def create_service_account(secret_name, namespace, sa_name): """ Create namespaced service account, and return the service account name """ try: client.CoreV1Api().create_namespaced_service_account( namespace, client.V1ServiceAccount( metadata=client.V1Obj...
Create namespaced service account, and return the service account name
create_service_account
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def patch_service_account(secret_name, namespace, sa_name): """ Patch namespaced service account to attach with created secret. """ try: client.CoreV1Api().patch_namespaced_service_account( sa_name, namespace, client.V1ServiceAccount( secrets=[...
Patch namespaced service account to attach with created secret.
patch_service_account
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def get_creds_name_from_config_map(creds): """ Get the credentials name from inferenceservice config map. """ try: isvc_config_map = client.CoreV1Api().read_namespaced_config_map( constants.INFERENCESERVICE_CONFIG_MAP_NAME, constants.INFERENCESERVICE_SYSTEM_NAMESPACE, ...
Get the credentials name from inferenceservice config map.
get_creds_name_from_config_map
python
kserve/kserve
python/kserve/kserve/api/creds_utils.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/creds_utils.py
Apache-2.0
def __init__( self, config_file=None, config_dict=None, context=None, # pylint: disable=too-many-arguments client_configuration=None, persist_config=True, ): """ KServe client constructor :param config_file: kubeconfig file, defaults to ~/.kub...
KServe client constructor :param config_file: kubeconfig file, defaults to ~/.kube/config :param config_dict: Takes the config file as a dict. :param context: kubernetes context :param client_configuration: kubernetes configuration object :param persist_config:
__init__
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def set_credentials( self, storage_type, namespace=None, credentials_file=None, service_account=constants.DEFAULT_SA_NAME, **kwargs, ): """ Setup credentials for KServe. :param storage_type: Valid value: GCS or S3 (required) :param nam...
Setup credentials for KServe. :param storage_type: Valid value: GCS or S3 (required) :param namespace: inference service deployment namespace :param credentials_file: the path for the credentials file. :param service_account: the name of service account. :param kwargs: ...
set_credentials
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def create( self, inferenceservice, namespace=None, watch=False, timeout_seconds=600 ): # pylint:disable=inconsistent-return-statements """ Create the inference service :param inferenceservice: inference service object :param namespace: defaults to current or default namespa...
Create the inference service :param inferenceservice: inference service object :param namespace: defaults to current or default namespace :param watch: True to watch the created service until timeout elapsed or status is ready :param timeout_seconds: timeout seconds for watch, d...
create
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def get( self, name=None, namespace=None, watch=False, timeout_seconds=600, version=constants.KSERVE_V1BETA1_VERSION, ): # pylint:disable=inconsistent-return-statements """ Get the inference service :param name: existing inference service name...
Get the inference service :param name: existing inference service name :param namespace: defaults to current or default namespace :param watch: True to watch the service until timeout elapsed or status is ready :param timeout_seconds: timeout seconds for watch, default to 600s ...
get
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def patch( self, name, inferenceservice, namespace=None, watch=False, timeout_seconds=600 ): # pylint:disable=too-many-arguments,inconsistent-return-statements """ Patch existing inference service :param name: existing inference service name :param inferenceservice: patched ...
Patch existing inference service :param name: existing inference service name :param inferenceservice: patched inference service :param namespace: defaults to current or default namespace :param watch: True to watch the patched service until timeout elapsed or status is ready ...
patch
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def replace( self, name, inferenceservice, namespace=None, watch=False, timeout_seconds=600 ): # pylint:disable=too-many-arguments,inconsistent-return-statements """ Replace the existing inference service :param name: existing inference service name :param inferenceservice: ...
Replace the existing inference service :param name: existing inference service name :param inferenceservice: replacing inference service :param namespace: defaults to current or default namespace :param watch: True to watch the replaced service until timeout elapsed or status is...
replace
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def delete(self, name, namespace=None, version=constants.KSERVE_V1BETA1_VERSION): """ Delete the inference service :param name: inference service name :param namespace: defaults to current or default namespace :param version: api group version :return: """ ...
Delete the inference service :param name: inference service name :param namespace: defaults to current or default namespace :param version: api group version :return:
delete
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def is_isvc_ready( self, name, namespace=None, version=constants.KSERVE_V1BETA1_VERSION ): # pylint:disable=inconsistent-return-statements """ Check if the inference service is ready. :param version: :param name: inference service name :param namespace: defaults to c...
Check if the inference service is ready. :param version: :param name: inference service name :param namespace: defaults to current or default namespace :return:
is_isvc_ready
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def wait_isvc_ready( self, name, namespace=None, # pylint:disable=too-many-arguments watch=False, timeout_seconds=600, polling_interval=10, version=constants.KSERVE_V1BETA1_VERSION, ): """ Waiting for inference service ready, print out the inf...
Waiting for inference service ready, print out the inference service if timeout. :param name: inference service name :param namespace: defaults to current or default namespace :param watch: True to watch the service until timeout elapsed or status is ready :param timeout_seconds...
wait_isvc_ready
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def create_trained_model(self, trainedmodel, namespace): """ Create a trained model :param trainedmodel: trainedmodel object :param namespace: defaults to current or default namespace :return: """ version = trainedmodel.api_version.split("/")[1] try: ...
Create a trained model :param trainedmodel: trainedmodel object :param namespace: defaults to current or default namespace :return:
create_trained_model
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def delete_trained_model( self, name, namespace=None, version=constants.KSERVE_V1ALPHA1_VERSION ): """ Delete the trained model :param name: trained model name :param namespace: defaults to current or default namespace :param version: api group version :return...
Delete the trained model :param name: trained model name :param namespace: defaults to current or default namespace :param version: api group version :return:
delete_trained_model
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def wait_model_ready( self, service_name, model_name, isvc_namespace=None, # pylint:disable=too-many-arguments isvc_version=constants.KSERVE_V1BETA1_VERSION, cluster_ip=None, protocol_version="v1", timeout_seconds=600, polling_interval=10, ): ...
Waiting for model to be ready to service, print out trained model if timeout. :param service_name: inference service name :param model_name: trained model name :param isvc_namespace: defaults to current or default namespace of inference service :param isvc_version: api group ver...
wait_model_ready
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def create_inference_graph( self, inferencegraph: V1alpha1InferenceGraph, namespace: str = None ) -> object: """ create a inference graph :param inferencegraph: inference graph object :param namespace: defaults to current or default namespace :return: created inferen...
create a inference graph :param inferencegraph: inference graph object :param namespace: defaults to current or default namespace :return: created inference graph
create_inference_graph
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def delete_inference_graph( self, name: str, namespace: str = None, version: str = constants.KSERVE_V1ALPHA1_VERSION, ): """ Delete the inference graph :param name: inference graph name :param namespace: defaults to current or default namespace ...
Delete the inference graph :param name: inference graph name :param namespace: defaults to current or default namespace :param version: api group version
delete_inference_graph
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def get_inference_graph( self, name: str, namespace: str = None, version: str = constants.KSERVE_V1ALPHA1_VERSION, ) -> object: """ Get the inference graph :param name: existing inference graph name :param namespace: defaults to current or default nam...
Get the inference graph :param name: existing inference graph name :param namespace: defaults to current or default namespace :param version: api group version :return: inference graph
get_inference_graph
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def is_ig_ready( self, name: str, namespace: str = None, version: str = constants.KSERVE_V1ALPHA1_VERSION, ) -> bool: """ Check if the inference graph is ready. :param name: inference graph name :param namespace: defaults to current or default namespa...
Check if the inference graph is ready. :param name: inference graph name :param namespace: defaults to current or default namespace :param version: api group version :return: true if inference graph is ready, else false.
is_ig_ready
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def wait_ig_ready( self, name: str, namespace: str = None, version: str = constants.KSERVE_V1ALPHA1_VERSION, timeout_seconds: int = 600, polling_interval: int = 10, ): """ Wait for inference graph to be ready until timeout. Print out the inference grap...
Wait for inference graph to be ready until timeout. Print out the inference graph if timeout. :param name: inference graph name :param namespace: defaults to current or default namespace :param version: api group version :param timeout_seconds: timeout seconds for waiting, defa...
wait_ig_ready
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def create_local_model_node_group( self, localmodelnodegroup: V1alpha1LocalModelNodeGroup ): """ Create a local model node group :param localmodelnodegroup: local model node group object :return: created local model node group object """ version = localmodeln...
Create a local model node group :param localmodelnodegroup: local model node group object :return: created local model node group object
create_local_model_node_group
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def get_local_model_node_group( self, name: str, version: str = constants.KSERVE_V1ALPHA1_VERSION ) -> object: """ Get the local model node group :param name: existing local model node group name :param version: api group version. Default to v1alpha :return: local mo...
Get the local model node group :param name: existing local model node group name :param version: api group version. Default to v1alpha :return: local model node group object
get_local_model_node_group
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def delete_local_model_node_group( self, name: str, version: str = constants.KSERVE_V1ALPHA1_VERSION ): """ Delete the local model node group :param name: local model node group name :param version: api group version. Default to v1alpha """ try: s...
Delete the local model node group :param name: local model node group name :param version: api group version. Default to v1alpha
delete_local_model_node_group
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def create_local_model_cache( self, localmodelcache: V1alpha1LocalModelCache ) -> object: """ Create a local model cache :param localmodelcache: local model cache object :return: created local model cache object """ version = localmodelcache.api_version.split...
Create a local model cache :param localmodelcache: local model cache object :return: created local model cache object
create_local_model_cache
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def get_local_model_cache( self, name: str, version: str = constants.KSERVE_V1ALPHA1_VERSION ) -> object: """ Get the local model cache :param name: existing local model cache name :param version: api group version. Default to v1alpha1 :return: local model cache obje...
Get the local model cache :param name: existing local model cache name :param version: api group version. Default to v1alpha1 :return: local model cache object
get_local_model_cache
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def delete_local_model_cache( self, name: str, version: str = constants.KSERVE_V1ALPHA1_VERSION ): """ Delete the local model cache :param name: local model cache name :param version: api group version. Default to v1alpha1 """ try: self.api_instan...
Delete the local model cache :param name: local model cache name :param version: api group version. Default to v1alpha1
delete_local_model_cache
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def is_local_model_cache_ready( self, name: str, nodes: List[str], version: str = constants.KSERVE_V1ALPHA1_VERSION, ) -> bool: """ Verify if the model is successfully cached on the specified node. :param name: local model cache name :param node_name:...
Verify if the model is successfully cached on the specified node. :param name: local model cache name :param node_name: name of the node to check if the model is cached :param version: api group version :return: true if the model is successfully cached, else false.
is_local_model_cache_ready
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def wait_local_model_cache_ready( self, name: str, nodes: List[str], version: str = constants.KSERVE_V1ALPHA1_VERSION, timeout_seconds: int = 600, polling_interval: int = 10, ): """ Wait for model to be cached locally for specified nodes until timeout....
Wait for model to be cached locally for specified nodes until timeout. :param name: local model cache name :param nodes: list of node names to check if the model is cached :param version: api group version :param timeout_seconds: timeout seconds for waiting, default to 600s. ...
wait_local_model_cache_ready
python
kserve/kserve
python/kserve/kserve/api/kserve_client.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/kserve_client.py
Apache-2.0
def isvc_watch(name=None, namespace=None, timeout_seconds=600, generation=0): """Watch the created or patched InferenceService in the specified namespace""" if namespace is None: namespace = utils.get_default_target_namespace() headers = ["NAME", "READY", "PREV", "LATEST", "URL"] table_fmt = "...
Watch the created or patched InferenceService in the specified namespace
isvc_watch
python
kserve/kserve
python/kserve/kserve/api/watch.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/api/watch.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/knative_addressable.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_addressable.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KnativeAddressable): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/knative_addressable.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_addressable.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KnativeAddressable): 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/knative_addressable.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_addressable.py
Apache-2.0
def status(self, status): """Sets the status of this KnativeCondition. Status of the condition, one of True, False, Unknown. # noqa: E501 :param status: The status of this KnativeCondition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_valid...
Sets the status of this KnativeCondition. Status of the condition, one of True, False, Unknown. # noqa: E501 :param status: The status of this KnativeCondition. # noqa: E501 :type: str
status
python
kserve/kserve
python/kserve/kserve/models/knative_condition.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_condition.py
Apache-2.0
def type(self, type): """Sets the type of this KnativeCondition. Type of condition. # noqa: E501 :param type: The type of this KnativeCondition. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 ...
Sets the type of this KnativeCondition. Type of condition. # noqa: E501 :param type: The type of this KnativeCondition. # noqa: E501 :type: str
type
python
kserve/kserve
python/kserve/kserve/models/knative_condition.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_condition.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/knative_condition.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_condition.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KnativeCondition): return False return self.to_dict() == other.to_dict()
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/knative_condition.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_condition.py
Apache-2.0
def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, KnativeCondition): 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/knative_condition.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_condition.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/knative_status.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_status.py
Apache-2.0
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, KnativeStatus): return False return self.__dict__ == other.__dict__
Returns true if both objects are equal
__eq__
python
kserve/kserve
python/kserve/kserve/models/knative_status.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_status.py
Apache-2.0
def force_query(self, force_query): """Sets the force_query of this KnativeURL. encoded path hint (see EscapedPath method) # noqa: E501 :param force_query: The force_query of this KnativeURL. # noqa: E501 :type: bool """ if self.local_vars_configuration.client_side_va...
Sets the force_query of this KnativeURL. encoded path hint (see EscapedPath method) # noqa: E501 :param force_query: The force_query of this KnativeURL. # noqa: E501 :type: bool
force_query
python
kserve/kserve
python/kserve/kserve/models/knative_url.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_url.py
Apache-2.0
def fragment(self, fragment): """Sets the fragment of this KnativeURL. encoded query values, without '?' # noqa: E501 :param fragment: The fragment of this KnativeURL. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and fragment is ...
Sets the fragment of this KnativeURL. encoded query values, without '?' # noqa: E501 :param fragment: The fragment of this KnativeURL. # noqa: E501 :type: str
fragment
python
kserve/kserve
python/kserve/kserve/models/knative_url.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_url.py
Apache-2.0
def host(self, host): """Sets the host of this KnativeURL. username and password information # noqa: E501 :param host: The host of this KnativeURL. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and host is None: # noqa: E501 ...
Sets the host of this KnativeURL. username and password information # noqa: E501 :param host: The host of this KnativeURL. # noqa: E501 :type: str
host
python
kserve/kserve
python/kserve/kserve/models/knative_url.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_url.py
Apache-2.0
def opaque(self, opaque): """Sets the opaque of this KnativeURL. :param opaque: The opaque of this KnativeURL. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and opaque is None: # noqa: E501 raise ValueError("Invalid value for ...
Sets the opaque of this KnativeURL. :param opaque: The opaque of this KnativeURL. # noqa: E501 :type: str
opaque
python
kserve/kserve
python/kserve/kserve/models/knative_url.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_url.py
Apache-2.0
def path(self, path): """Sets the path of this KnativeURL. host or host:port # noqa: E501 :param path: The path of this KnativeURL. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and path is None: # noqa: E501 raise Va...
Sets the path of this KnativeURL. host or host:port # noqa: E501 :param path: The path of this KnativeURL. # noqa: E501 :type: str
path
python
kserve/kserve
python/kserve/kserve/models/knative_url.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_url.py
Apache-2.0
def raw_query(self, raw_query): """Sets the raw_query of this KnativeURL. append a query ('?') even if RawQuery is empty # noqa: E501 :param raw_query: The raw_query of this KnativeURL. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validatio...
Sets the raw_query of this KnativeURL. append a query ('?') even if RawQuery is empty # noqa: E501 :param raw_query: The raw_query of this KnativeURL. # noqa: E501 :type: str
raw_query
python
kserve/kserve
python/kserve/kserve/models/knative_url.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_url.py
Apache-2.0
def scheme(self, scheme): """Sets the scheme of this KnativeURL. :param scheme: The scheme of this KnativeURL. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and scheme is None: # noqa: E501 raise ValueError("Invalid value for ...
Sets the scheme of this KnativeURL. :param scheme: The scheme of this KnativeURL. # noqa: E501 :type: str
scheme
python
kserve/kserve
python/kserve/kserve/models/knative_url.py
https://github.com/kserve/kserve/blob/master/python/kserve/kserve/models/knative_url.py
Apache-2.0