Scheduler¶
- class aido.scheduler.OptimizationTask(*args, **kwargs)[source]
Bases:
AIDOTaskThis Task requires n=’num_simulation_tasks’ of StartSimulationTask before running. If the output of this Task exists, then it will be completely skipped. When running, it calls the user-provided ‘interface.merge()’ and ‘interface.reconstruct()’ methods. The output of the later is passed to the Surrogate/Optimizer.
- output() Generator[source]
Only return output if not the root Task
- requires() Generator[source]
Starts the Reconstruction Tasks for regular reconstruction and for validation (the latter only if ‘num_validation_tasks’ > 0).
- run() None[source]
For each root file produced by the simulation Task, start a container with the reconstruction algorithm. Afterwards, the parameter dictionary used to generate these results are also passed as output
- Current parameter dict is the main parameter dict of this iteration that was used to generate the
simulations. It is fed to the Reconstruction and Surrogate/Optimizer models as input
- Updated parameter dict is the output of the optimizer and is saved as the parameter dict of the
next iteration (becoming its current parameter)
- Next parameter dict is the location of the next iteration’s parameter dict, if already exists, the
whole Tasks is skipped. Otherwise, the updated parameter dict is saved in this location
- class aido.scheduler.ReconstructionTask(*args, **kwargs)[source]
Bases:
AIDOTask- output() Generator[source]
Define the output files for the task based on the validation parameter.
- requires() Generator[source]
Require <i> SimulationTasks, runnable in parallel
- run() None[source]
Run the reconstruction process. The type of processing depends on the validation flag.
- class aido.scheduler.SimulationTask(*args, **kwargs)[source]
Bases:
AIDOTask- output() Generator[source]
Task outputs
- requires()[source]
Require OptimizationTask (N-1)
- run() None[source]
Note
The workflow is comprised of two steps: 1. Generate a new set of parameters based on the previous iteration 2. Start Geant4 simulations using the ‘interface.simulate’ method provided by the user