tidy3d icon indicating copy to clipboard operation
tidy3d copied to clipboard

Auto-set `Simulation.simulation_type` based on kwarg to `web.run()`

Open tylerflex opened this issue 1 year ago • 0 comments

The simulation_type kwarg determines how the simulation gets run on the background.

There's now a field Simulation.simulation_type that adds this flag and is needed for the autograd to differentiate between regular and fwd adjoint tasks for caching purposes.

It would be more robust perhaps if the web.upload() had some logic to either strip this from the Simulation or kwarg, make sure they are consistent, and ultimately place the data in the Simulation.

Would require some backend changes too to use the simulation field, instead of the webapi kwarg.

tylerflex avatar Jul 31 '24 19:07 tylerflex