The AI Foundry Command Job job type re-runs an Azure Machine Learning Command job (a script or binary on a compute target) in an Azure AI Foundry hub / Azure ML workspace. Azure ML has no separate job definitions: the job you import is a template run, identified by its job name (stored in External Id). Every Polysync execution submits a clone of it — same code snapshot, environment, compute, resources, distribution, limits and experiment — with the task's input values overlaid.
This job type is supported on the Azure AI Foundry platform.
name (set on import).AI Foundry Command Job (set automatically on import).Optional job settings — imported from the template, and sent only as overrides:
Compute Name — replaces properties.computeId (a compute name; Polysync expands it to the
workspace compute's ARM id). Empty on templates that run on serverless compute.Environment Name — replaces properties.environmentId. Keep the full id.Command — replaces properties.command.GET /jobs?api-version=2026-07-01&jobType=Command (every nextLink page is followed)
Each template's MLflow run is read once to declare what it produces. Runs Polysync submitted are
tagged polysync_template and never listed.
| Source on import | Polysync parameter | Direction |
|---|---|---|
inputs.<name> (literal) |
<name>, default = the template's value |
Input |
inputs.<name> (data: uri_file, uri_folder, mltable, …) |
<name>, default = the template's URI |
Input |
outputs.<name> (data output) |
<name> |
Output |
| MLflow metrics and tags the template run logged | <key> |
Output |
On execution, every Input / Input & Output parameter with a value is sent: a literal input
as { "jobInputType": "literal", "value": "<text>" }, and a data input keeps its type and mode
with its uri replaced. An empty value keeps the template's own value. Output parameters and the job
settings above are never sent as inputs.
{
"properties": {
"...": "(everything from the template, minus status/services/properties)",
"displayName": "<job name>-<yyyyMMddHHmmss>",
"computeId": "/subscriptions/…/workspaces/<ws>/computes/<Compute Name>",
"inputs": {
"<name>": { "jobInputType": "literal", "value": "<text>" }
},
"tags": { "polysync_template": "<template name>" }
}
}
Reference inputs in the command with ${{inputs.<name>}}; Azure ML substitutes the values.
GET /jobs/{externalId}: the template. If it is missing (deleted or archived), the run fails
with an instructive message and nothing is submitted.
PUT /jobs/polysync-{guid} with the clone above. The new name becomes the Polysync RunId.
Azure ML errors such as UserError: … are surfaced verbatim.
Status is polled with GET /jobs/{runId}:
| Azure ML status | Polysync status |
|---|---|
NotStarted, Starting, Provisioning, Preparing, Queued, Running, Finalizing, NotResponding, Paused |
Running |
Completed |
Success |
Failed |
Failed |
Canceled, CancelRequested |
Cancelled |
| (other) | Unknown |
When the run ends, start and end times and the failure message come from the workspace's
run-history API. A failed run reports for example UserError: Execution failed. User process 'python' exited with status code 2.
On success, output read-back fills Output / Input & Output parameters from:
mlflow.set_tag("echo", …)
or mlflow.log_metric("score", …);uri of any data output with an explicit path. Azure ML reports no URI for
default-path outputs.Everything else the run logged is returned as well, so it shows in the run record without a re-import.
Cancel: POST /jobs/{runId}/cancel.
https://ml.azure.com/runs/{runId}?wsid=/subscriptions/{subId}/resourcegroups/{rg}/workspaces/{workspaceName}
(the run's own Studio link when Azure ML returns one).
Template job '…' was not found — the template run was deleted or archived. Re-import a
current run.UserError: … compute … — the override Compute Name does not exist in the workspace.