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 tasks to submit at once in a batch, if None, will run all at the same time.
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.
- 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.