GriffithsLab / fooof-unit

Project repo for Sorenza Bastiaens' GSoC 2020 work
MIT License
0 stars 1 forks source link

Calculations Parameter Space Exploration #23

Closed sbastiaens closed 4 years ago

sbastiaens commented 4 years ago

Calculations for medium and large size parameter space exploration for each model (Generic2DOscillator, Wilson-Cowan, Jansen-Riit

sbastiaens commented 4 years ago

After multiple runs, this is the estimated time I deduced corresponding to one simulation run (for each model): Generic 2D Oscillator : 1.14 seconds Wilson-Cowan: 3.67 s Jansen-Rit : 1.2 s Therefore, the general formula I used was : number of variables ^(number of parameters) x time taken for one combination of parameters.

After looking at the TVB documentation, I am proposing the range of each parameters to be the value closest to their range limit (not always the limit values itself as some combinations don't compute). From the range, I chose a granularity to obtain 11 variables per parameters. Proposal of first runs for each model:

Here is the approximate time it would take for 4 parameters and 11 variables:

I am still working on the code to generate the database. Since, Wilson-Cowan simulations take a much longer time to run then the other two, maybe these simulations could be run on a grid? Let me know what you think of the first run proposals and if I need to make other proposal

JohnGriffiths commented 4 years ago

Thinking about how this would be used in a HPC context (i.e. batch submission of jobs to a compute grid).

Because each execution time is on the order of seconds, we wouldn't want to submit a single job for each parameter comb.

Depending on the specific grid capacity, you generally want each individual grid jobs to run between a few dozen minutes to a few hours.

So the right way to do this would be to send small lists of parameter combs to each grid job.

This is actually convenient because it makes the grid submission use case somewhat similar to the local machine use case.

What we need to have is a python file that runs something like this from the command line

python make_funit_db.py params.txt outfile.csv

make_funit_db.py should have, minimally, the following two methods:

def make_db - makes the database file for a param list and output filename (TVB_database in the current code seems fine for this)

def main.... - controls the command line execution. Reads in the text file defining the parameter set and the output filename, supplied during the command line call. Gives that info to a make_db call

We also want to be able to run within python. So that would be something like

from make_funit_db import make_db
make_db(input_args)

...which would correspond to the current usage in the nb.

rgerkin commented 4 years ago

@JohnGriffiths And do you imagine that the python file you described is run once per job? So then there needs to be another controller to split up the big params list into each of the params.txt that get sent to each job, and finally a script (one or two lines) to collect and merge the resulting outfile.csv files.