Use a Scikit-learn Serving Run
The service is executed remotely. Call run.refresh() and inspect run.status to check its progress. When ready, the status includes the service details.
By default, invoke() sends requests to the MLServer V2 inference endpoint at http://<service_url>/v2/models/{model_name}/infer. The default model name is "model"; pass model_name if the endpoint uses a different name. You can also pass an explicit url, which must start with the service URL.
invoke
Invoke served model. By default it exposes infer v2 endpoint
(http://
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_name
|
str
|
Name of the model to build the URL for. |
None
|
method
|
str
|
Method of the request (e.g., "GET", "POST"). |
'POST'
|
url
|
str
|
URL to invoke. If specified, it must start with the service URL (http:// or https:// prefixes are required and stripped before comparison). |
None
|
**kwargs
|
dict
|
Keyword arguments to pass to the request. |
{}
|
Returns:
| Type | Description |
|---|---|
Response
|
Response from the request. |