Manually trigger the modeling cycle

This article guides developers who want to use the "Model Now" tool - a way to manually trigger a cooking cycle for their modeling resource.

After a modeling resource has been created and deployed, the Intelligent Recommendations service will continue to process data through a periodic cooking cycle. By default, the data cooking cycle occurs every 36 hours.

You can choose to manually trigger the modeling cycle (with some limitations) ahead of the default 36-hour schedule. Reasons for a default modeling push might be due to last-minute fine-tuning of data, or as a result of data configuration errors in Azure Data Lake Storage.

To manually trigger the modeling process, use the API call outlined in this article.

How to manually trigger the modeling process

Trigger a modeling cycle with Insomnia

The following POST request starts a new modeling cycle:

https://<your-endpoint-url>/Control/V1.0/Model?modeling=<your-modeling-name>

You can find your endpoint URL using the steps in the Quick start guide for seeing recommendations results.

Limitations with manually triggering the modeling process

There are a few limitations to keep in mind for manually triggering the modeling process:

  • A user can execute a new Model Now POST request every 30 minutes.

  • A user can make a max number of 5 POST requests per 24h (rolling window).

  • The modeling parameter is considered optional. If you haven't specified any parameter, the default modeling resource is triggered.

  • Similar to all other API calls, triggering the modeling process with the POST request is an authenticated call to the Intelligent Recommendations endpoint, so you need to include the authentication details. For more information, see Quick start guide for authenticated API calls.

API response samples

Success message

A successful response includes a success message:

{
    "status": "Success",
    "environmentId": "your env id will be written here",
    "version": "20210930173241" // this is the timestamp of the trigger
}

Error message

An error message may occur:

  • If a cooking cycle is already in progress
  • If too many trigger requests sent exceed the allowed frequency (max of 5 tries every 24 hours, or more than once per 30-minute window).

The error message looks like this:

{
    "error": {
        "code": "TooManyRequests",
        "message": "Too many requests"
    }
}

To learn more about other error messages that may occur during the modeling process, see Error logs.

See also

Data contract overview
Quick start guide: Create an API request
Quick start guide: Set up and run Intelligent Recommendations with sample data
Deployment overview