ISISComputingGroup / ISISComputingGroup/IBEX
genie_python: Simulation Mode for Checking Scripts
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 6
- Fork
- 2
- Merge medio
- 16h 40m
- PR unite (30g)
- 2
Descrizione
As a scientist, I would like IBEX to support a simulation mode, so that I can perform "dry-runs" of my experiments to check the behaviour of my scripts, catch errors and estimate execution times.
#### Acceptance Criteria
1. I can activate a simulation mode (#5480) or specify that a script be executed in simulation mode.
1. In simulation mode, I get feedback on the performance of my script:
1. Any errors or warnings in my script are reported back to me.
1. IBEX reports the time taken to execute the script in simulation mode
1. IBEX reports an estimated time required to execute the script for real
#### Notes
1. This issue arises from a discussion at the [6th SAG Meeting,13th Jan 2020](https://stfc365.sharepoint.com/sites/IBEXSAG/Shared%20Documents/Forms/AllItems.aspx)
1. It could be that the simulation is performed by the Script Generator.
1. Some scientists have written their own "simulation" scripts:
1. MARI: [simscript.py](http://www.facilities.rl.ac.uk/isis/computing/ICPdiscussions/MARI/simscript.py)
1. SANDALS: [to-be-provided]
1. Notes about [simscript.py](http://www.facilities.rl.ac.uk/isis/computing/ICPdiscussions/MARI/simscript.py)
> From Duc Le:
> So my quick hack is in the attached file (`symscript.py`). It's just put in the `inst` folder in the user settings on the NDX machine so that it's automatically loaded when IBEX starts and is accessible using the `inst.` notation.
> There are two main user accessible functions:
> `inst.simulate(state)`
> `inst.load_script(file)`
> `inst.simulate` toggles simulation mode on or off if you don't specify
> "state" (e.g. `inst.simulate()`).
> `inst.load_script` switches simulate mode on, loads the script, runs it
> and if there are no errors keeps the script in memory and switches
> simulate mode off. If there are errors it *does not* load the script
> into memory (e.g. the old script stays in memory).
> Hope this helps,
> Duc.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reading the genie_python entry points described in the issue, especially inst.simulate(state) and inst.load_script(file), then compare them with the existing simscript.py examples. Review issue #5480 for the activation context. Done means scripts can be run in simulation mode, report errors and warnings, show simulation duration, and estimate real execution time.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100