Application Programming Interface#
Submission#
- aurora.foundry.client.api.submit(batch: Batch, model_name: str, num_steps: int, channel: CommunicationChannel, foundry_client: FoundryClient, fine_lead_times: Sequence[float] | None = None, saved_surf_vars: tuple[str, ...] | None = None, saved_atmos_vars: tuple[str, ...] | None = None, saved_atmos_levels: tuple[int | float, ...] | None = None, saved_static_vars: tuple[str, ...] | None = None, async_upload_workers: int = 0, return_urls: bool = False) Generator[Batch | str, None, None][source]#
Submit a request to Azure AI Foundry and retrieve the predictions.
- Parameters:
batch (
aurora.Batch) – Initial condition.model_name (str) – Name of the model. This name must be available in
aurora.foundry.common.model. See the Aurora Foundry Python API documentation for which models are available.num_steps (int) – Number of main prediction steps.
channel (
aurora.foundry.common.channel.CommunicationChannel) – Channel to use for sending and receiving data.foundry_client (
aurora.foundry.client.foundry.FoundryClient) – Client to communicate with Azure Foundry AI.fine_lead_times (sequence of float, optional) – Sub-step lead times in hours within each main step. When provided, the total number of predictions returned is num_steps * len(fine_lead_times). See
aurora.rollout()for details. Aurora-1.5 only.saved_surf_vars (tuple[str, ...], optional) – Surface variables to keep in the saved predictions. None (default) keeps all variables. An empty tuple removes all surface variables from the output. Aurora-1.5 only.
saved_atmos_vars (tuple[str, ...], optional) – Atmospheric variables to keep in the saved predictions. None keeps all. An empty tuple removes all. Aurora-1.5 only.
saved_atmos_levels (tuple[int | float, ...], optional) – Pressure levels (hPa) to keep in the saved predictions. None keeps all levels. An empty tuple removes all levels. Aurora-1.5 only.
saved_static_vars (tuple[str, ...], optional) – Static variables to keep in the saved predictions. None keeps all. An empty tuple removes all. Aurora-1.5 only.
async_upload_workers (int, optional) – If > 0, the server will serialize and upload predictions in parallel worker processes so that GPU inference can proceed concurrently. The value controls the number of worker processes. This can speed up end-to-end prediction time significantly. Values > 0 are only valid for the Aurora-1.5 Foundry model.
return_urls (bool, optional) – If True, yield the blob storage URLs of the predictions instead of downloading them. This is useful to avoid downloading and opening large files on the local client, instead providing the URLs for later download. Defaults to False.
- Yields:
aurora.Batch– Predictions.
Available Models#
These models need to be referred to by the value of their attribute name.
- class aurora.foundry.common.model.AuroraFineTuned[source]#
- name = 'aurora-0.25-finetuned'#
Name of the model.
- Type:
str
- class aurora.foundry.common.model.AuroraPretrained[source]#
- name = 'aurora-0.25-pretrained'#
Name of the model.
- Type:
str
- class aurora.foundry.common.model.AuroraSmallPretrained[source]#
- name = 'aurora-0.25-small-pretrained'#
Name of the model.
- Type:
str
- class aurora.foundry.common.model.Aurora12hPretrained[source]#
- name = 'aurora-0.25-12h-pretrained'#
Name of the model.
- Type:
str
- class aurora.foundry.common.model.AuroraHighRes[source]#
- name = 'aurora-0.1-finetuned'#
Name of the model.
- Type:
str