tidy3d.web.api.asynchronous.run_async

Contents

tidy3d.web.api.asynchronous.run_async#

class run_async[source]#

Bases:

Submits a set of Union[Simulation, HeatSimulation, EMESimulation] objects to server, starts running, monitors progress, downloads, and loads results as a BatchData object.

Parameters:
  • simulations (Union[dict[str, Union[Simulation, HeatSimulation, EMESimulation]], tuple[Union[Simulation, HeatSimulation, EMESimulation]], list[Union[Simulation, HeatSimulation, EMESimulation]]]) – Mapping of task name to simulation or list of simulations.

  • folder_name (str = "default") – Name of folder to store each task on web UI.

  • path_dir (PathLike) – Base directory where data will be downloaded, by default current working directory.

  • callback_url (str = None) – Http PUT url to receive simulation finish event. The body content is a json file with fields {'id', 'status', 'name', 'workUnit', 'solverVersion'}.

  • num_workers (int = None) – Number of worker threads used by configurable Batch stages (for example, monitoring downloads). Upload and start use a separate fixed concurrency of 64 workers.

  • verbose (bool = True) – If True, will print progressbars and status, otherwise, will run silently.

  • simulation_type (Optional[str] = None) – Type of simulation being uploaded. If None, uses td.config.run.simulation_type.

  • solver_version (Optional[str] = None) – Target solver version. If None, uses td.config.run.solver_version.

  • reduce_simulation (Literal["auto", True, False] = "auto") – Whether to reduce structures in the simulation to the simulation domain only. Note: currently only implemented for the mode solver.

  • pay_type (Optional[Union[PayType, str]] = None) – Payment method. If None, uses td.config.run.pay_type.

  • priority (int = None) – Priority of the simulation in the Virtual GPU (vGPU) queue (1 = lowest, 10 = highest). It affects only simulations from vGPU licenses and does not impact simulations using FlexCredits.

  • lazy (bool = False) – Whether to load the actual data (lazy=False) or return a proxy that loads the data when accessed (lazy=True).

  • vgpu_allocation (Optional[int] = None) – Number of virtual GPUs to allocate for the simulation (1, 2, 4, or 8). Only applies to vGPU license users. If not specified, uses td.config.vgpu.vgpu_allocation. If that is also unset, the system automatically determines the optimal GPU count.

  • ignore_memory_limit (Optional[bool] = None) – If True, allows the simulation to run even when estimated vGPU memory exceeds the allocation limit (up to 2x the limit). Only applies to vGPU license users. If None, uses td.config.vgpu.ignore_memory_limit.

Returns:

Contains the Union[SimulationData, HeatSimulationData, EMESimulationData] for each Union[Simulation, HeatSimulation, EMESimulation] in Batch.

Return type:

BatchData

See also

Job

Interface for managing the running of a Simulation on server.

Batch

Interface for submitting several Simulation objects to sever.

Notes

Passing run options directly is deprecated. Set defaults via td.config.run and td.config.vgpu instead. Non-None values passed here override the config for this call.