tidy3d.web.api.mode.ModeSolverTask#
- class ModeSolverTask[source]#
- Bases: - ResourceLifecycle,- Submittable- Interface for managing the running of a - ModeSolvertask on server.- Attributes - Methods - abort()- Abort the mode solver and its corresponding task from the server. - create(mode_solver[, task_name, ...])- Create a new mode solver task on the server. - delete()- Delete the mode solver and its corresponding task from the server. - get(task_id, solver_id[, to_file, sim_file, ...])- Get mode solver task from the server by id. - get_info()- Get the current state of this task on the server. - get_log([to_file, verbose, progress_callback])- Get execution log for this task from the server. - get_modesolver([to_file, sim_file, verbose, ...])- Get mode solver associated with this task from the server. - get_result([to_file, verbose, progress_callback])- Get mode solver results for this task from the server. - submit([pay_type])- Start the execution of this task. - upload([verbose, progress_callback])- Upload this task's 'mode_solver' to the server. - Inherited Common Usage - task_id#
 - solver_id#
 - real_flex_unit#
 - created_at#
 - status#
 - file_type#
 - mode_solver#
 - classmethod create(mode_solver, task_name='Untitled', mode_solver_name='mode_solver', folder_name='Mode Solver')[source]#
- Create a new mode solver task on the server. - Parameters:
- mode_solver (:class".ModeSolver") – The object that will be uploaded to server in the submitting phase. 
- task_name (str = "Untitled") – The name of the task. 
- mode_solver_name (str = "mode_solver") – The name of the mode solver to create the in task. 
- folder_name (str = "Mode Solver") – The name of the folder to store the task. 
 
- Returns:
- ModeSolverTaskobject containing information about the created task.
- Return type:
 
 - classmethod get(task_id, solver_id, to_file='mode_solver.hdf5', sim_file='simulation.hdf5', verbose=True, progress_callback=None)[source]#
- Get mode solver task from the server by id. - Parameters:
- task_id (str) – Unique identifier of the task on server. 
- solver_id (str) – Unique identifier of the mode solver in the task. 
- to_file (str = "mode_solver.hdf5") – File to store the mode solver downloaded from the task. 
- sim_file (str = "simulation.hdf5") – File to store the simulation downloaded from the task. 
- verbose (bool = True) – Whether to display progress bars. 
- progress_callback (Callable[[float], None] = None) – Optional callback function called while downloading the data. 
 
- Returns:
- ModeSolverTaskobject containing information about the task.
- Return type:
 
 - get_info()[source]#
- Get the current state of this task on the server. - Returns:
- ModeSolverTaskobject containing information about the task, without the mode solver.
- Return type:
 
 - upload(verbose=True, progress_callback=None)[source]#
- Upload this task’s ‘mode_solver’ to the server. - Parameters:
- verbose (bool = True) – Whether to display progress bars. 
- progress_callback (Callable[[float], None] = None) – Optional callback function called while uploading the data. 
 
 
 - submit(pay_type=PayType.AUTO)[source]#
- Start the execution of this task. - The mode solver must be uploaded to the server with the - ModeSolverTask.upload()method before this step.
 - get_modesolver(to_file='mode_solver.hdf5', sim_file='simulation.hdf5', verbose=True, progress_callback=None)[source]#
- Get mode solver associated with this task from the server. - Parameters:
- to_file (str = "mode_solver.hdf5") – File to store the mode solver downloaded from the task. 
- sim_file (str = "simulation.hdf5") – File to store the simulation downloaded from the task, if any. 
- verbose (bool = True) – Whether to display progress bars. 
- progress_callback (Callable[[float], None] = None) – Optional callback function called while downloading the data. 
 
- Returns:
- ModeSolverobject associated with this task.
- Return type:
- ModeSolver
 
 - get_result(to_file='mode_solver_data.hdf5', verbose=True, progress_callback=None)[source]#
- Get mode solver results for this task from the server. - Parameters:
- to_file (str = "mode_solver_data.hdf5") – File to store the mode solver downloaded from the task. 
- verbose (bool = True) – Whether to display progress bars. 
- progress_callback (Callable[[float], None] = None) – Optional callback function called while downloading the data. 
 
- Returns:
- Mode solver data with the calculated results. 
- Return type:
 
 - get_log(to_file='mode_solver.log', verbose=True, progress_callback=None)[source]#
- Get execution log for this task from the server. - Parameters:
- to_file (str = "mode_solver.log") – File to store the mode solver downloaded from the task. 
- verbose (bool = True) – Whether to display progress bars. 
- progress_callback (Callable[[float], None] = None) – Optional callback function called while downloading the data. 
 
- Returns:
- path – Path to saved file. 
- Return type:
- pathlib.Path