Create an API endpoint#

See a screencast covering this section’s steps

Dataiku’s architecture for MLOps supports both batch and real-time API frameworks. In this case, let’s implement a real-time API strategy to individually score a new job posting as real or fake.

Create an API service including a prediction endpoint#

The first step is packaging the saved model in the Flow as a prediction endpoint within an API service.

  1. From the Flow, click on the saved model Predict fraudulent (binary) once to select it.

  2. Click to open the Actions tab.

  3. Select Create API.

  4. Name the service ID job_postings.

  5. Name the endpoint ID predict_fake_job.

  6. Click Append.

Dataiku screenshot of dialog for creating an API endpoint.

Note

This path was a shortcut to the API Designer found in the top navigation bar’s More Options (…) menu.

Add test queries#

Before deploying, let’s add some test queries to the API endpoint to make sure that it is working correctly.

  1. For the predict_fake_job endpoint, navigate to the Test queries panel.

  2. Click + Add Queries.

  3. Add 5 queries.

  4. Choose to add them from the test dataset.

  5. Click Add.

  6. Click Run Test Queries.

  7. Examine some of the test queries, including the features that were sent to the endpoint, the prediction returned, and additional details.

Dataiku screenshot of test queries in the API designer.