Batch Prediction Jobs
Last updated
Last updated
MinIO should already be installed with Seldon Enterprise Platform. The MinIO browser should be exposed on /minio/
(note the trailing forward slash).
For trials, the credentials will by default be the same as the Enterprise Platform login, with MinIO using the email as its Access Key
and the password as its Secret Key
.
Other cloud storage services, such as S3
and GCS
, can be specified alternatively with the corresponding secret files configured.
On a production cluster, the namespace needs to have been set up with a service account. This can be found under the argo install documentation.
This demo helps you learn about:
Deploying a deployment with a pre trained SKlearn iris model
Running a batch job to get predictions
Checking the output
Click on Create new deployment
button.
Enter the deployment details as follows:
Name: batch-demo
Namespace: seldon
Type: Seldon Deployment
Configure the default predictor as follows:
Runtime: Scikit Learn
Model URI: gs://seldon-models/scv2/samples/mlserver_1.6.0/iris-sklearn
Model Project: default
Storage Secret: (leave blank/none)
Model Name: iris
Skip Next
for the remaining steps, then click Launch
.
If your deployment is launched successfully, it will have Available
status, on the overview page.
Download the input data file iris-input.txt
.
The first few lines of the input file `iris-input.txt` should show the following format:
Go to the MinIO browser and use the button in the bottom-right to create a bucket. Call it data
.
Again from the bottom-right choose to upload the iris-input.txt
file to the data
bucket.
Click the new deployment batch-demo
in the Overview page.
Click the Batch Jobs in the left pane.
Click Create Your First Job, enter the following details, and click Submit:
Input Data Location: minio://data/iris-input.txt
Output Data Location: minio://data/iris-output-{{workflow.name}}.txt
Number of Workers: 5
Number of Retries: 3
Batch Size: 10
Minimum Batch Wait Interval (sec) : 0
Method: Predict
Transport Protocol: REST
Input Data Type: Open Inference Protocol (OIP)
Object Store Secret Name: minio-bucket-envvars
Note: In this job minio-bucket-envvars
is a pre-created secret in the same namespace as the model, containing environment variables.
In the Resources (Optional)
section, you can specify how much memory and CPU are allocated to the containers in this specific batch job workflow. If no values are set on this form, the default values specified in Helm values will be used. Refer to the Kubernetes documentation on requests and limits for details.
4. Give the job a couple of minutes to complete, then refresh the page to see the status.
5. Inspect the output file in MinIO:
If you open that file you should see contents such as:
If not, see the argo section for troubleshooting.
The Model Name
is linked to the name described in the model-settings.json
file, located in the Google Cloud Storage location. Changing the name in the JSON file would also require changing the Model Name
, and vice versa.