Using execution classes¶
Info
Learn the concepts and fundamentals of execution classes in the Explanation page.
Execution classes define the characteristics of how instances are executed, such as:
- cores
- memory
- maximum run time
- GPU acceleration
You can customize the execution classes used by runs by modifying the instance configuration, or directly when starting a run.
Using execution classes when running¶
You can use allowed execution classes with the nextmv cloud run
create command in two ways:
- Use directly when starting a run with the
--execution-classflag, or - Attach it to an instance configuration with the
--execution-classflag and use that instance when starting a run.
Here is an example where the execution class is used directly when starting a run.
✅ Run latest-AErUIFEvR created.
⏳ Getting run results...
✅ Run outputs saved to latest-AErUIFEvR-output. Here is the metadata.
{
"description": "",
"id": "latest-AErUIFEvR",
"metadata": {
"application_id": "uncanny-rodent",
"application_instance_id": "latest",
"application_version_id": "",
"created_at": "2026-07-23T21:53:40Z",
"duration": 6336.0,
"error": "",
"execution_class": "6c9500mb870s",
"execution_duration": 4400.0,
"format": {
"input": {
"type": "multi-file"
},
"output": {
"type": "multi-file"
}
},
"initiated_at": "2026-07-23T21:53:41.369407Z",
"input_size": 261.0,
"metrics": {
"metrics": {
"message": "Hello, Patches",
"value": 1.23
}
},
"options": {
"active_options": {
"details": "true"
},
"options_summary": [
{
"name": "details",
"source": "version",
"value": "true"
}
]
},
"output_size": 158.0,
"queuing_disabled": false,
"queuing_priority": 6,
"run_type": {
"type": "standard",
"definition_id": "",
"reference_id": ""
},
"runtime": "python-3_11",
"status_v2": "succeeded"
},
"name": "",
"user_email": "sebastian@nextmv.io",
"console_url": "https://cloud.nextmv.io/app/uncanny-rodent/run/latest-AErUIFEvR?view=details"
}
Let's say we have an instance identified as production. First, let's update
it to use a specific execution class.
⏳ Updating instance...
✅ Instance production updated successfully in application uncanny-rodent.
{
"id": "production",
"application_id": "uncanny-rodent",
"version_id": "v0.0.1",
"name": "The main production instance",
"description": "",
"configuration": {
"execution_class": "6c9500mb870s",
"queuing": {
"priority": 6,
"disabled": false
}
},
"locked": false,
"created_at": "2026-07-23T17:35:36.018490Z",
"updated_at": "2026-07-23T21:55:18.598498Z"
}
We can now start a run using the production instance, and the attached
execution class will be used automatically.
✅ Run production-XFRCSFPDR created.
⏳ Getting run results...
✅ Run outputs saved to production-XFRCSFPDR-output. Here is the metadata.
{
"description": "",
"id": "production-XFRCSFPDR",
"metadata": {
"application_id": "uncanny-rodent",
"application_instance_id": "production",
"application_version_id": "v0.0.1",
"created_at": "2026-07-23T21:55:54Z",
"duration": 4096.0,
"error": "",
"execution_class": "6c9500mb870s",
"execution_duration": 3495.0,
"format": {
"input": {
"type": "multi-file"
},
"output": {
"type": "multi-file"
}
},
"initiated_at": "2026-07-23T21:55:55.541573Z",
"input_size": 261.0,
"metrics": {
"metrics": {
"message": "Hello, Patches",
"value": 1.23
}
},
"options": {
"active_options": {
"details": "true"
},
"options_summary": [
{
"name": "details",
"source": "version",
"value": "true"
}
]
},
"output_size": 158.0,
"queuing_disabled": false,
"queuing_priority": 6,
"run_type": {
"type": "standard",
"definition_id": "",
"reference_id": ""
},
"runtime": "python-3_11",
"status_v2": "succeeded"
},
"name": "",
"user_email": "sebastian@nextmv.io",
"console_url": "https://cloud.nextmv.io/app/uncanny-rodent/run/production-XFRCSFPDR?view=details"
}