tidy3d.plugins.adjoint.web.run_async#
- class run_async[source]#
Bases:
Submits a set of
JaxSimulation
objects to server, starts running, monitors progress, downloads, and loads results as a tuple ofJaxSimulationData
objects.- Parameters:
simulations (Tuple[
JaxSimulation
, β¦]) β Collection ofJaxSimulations
to run asynchronously.folder_name (str = "default") β Name of folder to store each task on web UI.
path_dir (str) β 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'}
.verbose (bool = True) β If True, will print progressbars and status, otherwise, will run silently.
num_workers (int = None) β Number of tasks to submit at once in a batch, if None, will run all at the same time.
Note
This is an experimental feature and may not work on all systems or configurations. For more details, see
https://realpython.com/async-io-python/
.- Returns:
Contains the
JaxSimulationData
of eachJaxSimulation
.- Return type:
Tuple[
JaxSimulationData
, β¦]
Inherited Common Usage
- bwd(path_dir, callback_url, verbose, num_workers, res, batch_data_vjp)#
Run backward pass and return simulation storing vjp of the objective w.r.t. the sim.
- fun(folder_name='default', path_dir='.', callback_url=None, verbose=True, num_workers=None)#
Submits a set of
JaxSimulation
objects to server, starts running, monitors progress, downloads, and loads results as a tuple ofJaxSimulationData
objects.- Parameters:
simulations (Tuple[
JaxSimulation
, β¦]) β Collection ofJaxSimulations
to run asynchronously.folder_name (str = "default") β Name of folder to store each task on web UI.
path_dir (str) β 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'}
.verbose (bool = True) β If True, will print progressbars and status, otherwise, will run silently.
num_workers (int = None) β Number of tasks to submit at once in a batch, if None, will run all at the same time.
Note
This is an experimental feature and may not work on all systems or configurations. For more details, see
https://realpython.com/async-io-python/
.- Returns:
Contains the
JaxSimulationData
of eachJaxSimulation
.- Return type:
Tuple[
JaxSimulationData
, β¦]
- fwd(folder_name, path_dir, callback_url, verbose, num_workers)#
Run forward pass and stash extra objects for the backwards pass.
- nondiff_argnums = (1, 2, 3, 4, 5)#
- optimize_remat = False#
- symbolic_zeros = False#