@@ -107,7 +107,7 @@ def run(
107107 local_gradient : bool = LOCAL_GRADIENT ,
108108 max_num_adjoint_per_fwd : int = MAX_NUM_ADJOINT_PER_FWD ,
109109 reduce_simulation : Literal ["auto" , True , False ] = "auto" ,
110- pay_type : PayType = PayType .AUTO ,
110+ pay_type : typing . Union [ PayType , str ] = PayType .AUTO ,
111111) -> SimulationDataType :
112112 """
113113 Submits a :class:`.Simulation` to server, starts running, monitors progress, downloads,
@@ -145,7 +145,7 @@ def run(
145145 Maximum number of adjoint simulations allowed to run automatically.
146146 reduce_simulation: Literal["auto", True, False] = "auto"
147147 Whether to reduce structures in the simulation to the simulation domain only. Note: currently only implemented for the mode solver.
148- pay_type: PayType = AUTO
148+ pay_type: typing.Union[ PayType, str] = PayType. AUTO
149149 Which method to pay for the simulation.
150150 Returns
151151 -------
@@ -191,7 +191,6 @@ def run(
191191 :meth:`tidy3d.web.api.container.Batch.monitor`
192192 Monitor progress of each of the running tasks.
193193 """
194-
195194 if is_valid_for_autograd (simulation ):
196195 return _run (
197196 simulation = simulation ,
@@ -241,7 +240,7 @@ def run_async(
241240 local_gradient : bool = LOCAL_GRADIENT ,
242241 max_num_adjoint_per_fwd : int = MAX_NUM_ADJOINT_PER_FWD ,
243242 reduce_simulation : Literal ["auto" , True , False ] = "auto" ,
244- pay_type : PayType = PayType .AUTO ,
243+ pay_type : typing . Union [ PayType , str ] = PayType .AUTO ,
245244) -> BatchData :
246245 """Submits a set of Union[:class:`.Simulation`, :class:`.HeatSimulation`, :class:`.EMESimulation`] objects to server,
247246 starts running, monitors progress, downloads, and loads results as a :class:`.BatchData` object.
@@ -270,7 +269,7 @@ def run_async(
270269 Maximum number of adjoint simulations allowed to run automatically.
271270 reduce_simulation: Literal["auto", True, False] = "auto"
272271 Whether to reduce structures in the simulation to the simulation domain only. Note: currently only implemented for the mode solver.
273- pay_type: PayType = PayType.AUTO
272+ pay_type: typing.Union[ PayType, str] = PayType.AUTO
274273 Specify the payment method.
275274
276275 Returns
@@ -288,7 +287,6 @@ def run_async(
288287 :class:`Batch`
289288 Interface for submitting several :class:`Simulation` objects to sever.
290289 """
291-
292290 if is_valid_for_autograd_async (simulations ):
293291 return _run_async (
294292 simulations = simulations ,
0 commit comments