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 aBatchDataobject.- 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
Batchstages (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, usestd.config.run.simulation_type.solver_version (Optional[str] = None) – Target solver version. If
None, usestd.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, usestd.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. IfNone, usestd.config.vgpu.ignore_memory_limit.
- Returns:
Contains the Union[
SimulationData,HeatSimulationData,EMESimulationData] for each Union[Simulation,HeatSimulation,EMESimulation] inBatch.- Return type:
See also
JobInterface for managing the running of a Simulation on server.
BatchInterface for submitting several
Simulationobjects to sever.
Notes
Passing run options directly is deprecated. Set defaults via
td.config.runandtd.config.vgpuinstead. Non-Nonevalues passed here override the config for this call.