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 (str = "tidy3d") – Type of simulation being uploaded.

  • solver_version (Optional[str] = None) – Target 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 (Union[PayType, str] = PayType.AUTO) – Specify the payment method.

  • 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 (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, 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. Default None leaves the server behaviour unchanged.

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.