In this guide we will walk you through training your own custom model.
Starting a training job
Here we kick off a training job using a dataset that’s already been registered for you. The resulting model will classify facial expressions as negative, positive, or neutral.
Note that we’ve set target_feature
to “Affect”. This refers to the name of the column that we want to predict from our dataset.
You’ll get back a job ID that you can use to check the status of your training job.
Checking the status of your training job
Using the job ID from the previous step, you can get details about the current status of your training job.
It may take a few minutes for your model to be ready, but once training is complete you will see the status as COMPLETED
and you’ll have access to your new model.
Testing your custom model
Your custom model is ready to use!
You can test your model by sending a request to the Custom Models inference endpoint with URLs of images to classify. The model we trained is a facial expression classifier, so test URLs should point to images of faces.
Just like before, we get back a job ID that we can use to check the status of our job.
Checking the status of your inference job
Use the job ID from the previous step to check on the status of your model inference job.
Once the model is done predicting the classes of the images you provided, you’ll get a COMPLETED
status.
Getting model predictions
Finally, you can request the actual model predictions from the inference job. The JSON result will show the predicted class for each image you provided.