pycnic / pysimkernel

A Python package to control parameter scans and iterations for computational experiments
ISC License
1 stars 2 forks source link

Provide a clear interface that explicitly binds each parameter to one layer (many-to-one) #28

Open andsor opened 8 years ago

andsor commented 8 years ago

I would like to reconsider the flexible hierarchization framework we developed last time

instead, I would like to propose to explicitly bind parameter(s) to layers, each parameter belongs to a layer, each layer may have multiple parameters (1-n)

let's say we have a simulation function

def sim(x, y, z):
    ...

Then I could write

xp = Experiment(sim, inputgen={'x': ...})

to bind x and leave y and z unbound for upper layers

the package automatically detects that only x is bound

it also inspects the generator and if it takes additionally arguments such as y or z, it automagically supplies the values to it at runtime

andsor commented 8 years ago

each input generator can take additional arguments, which need to be supplied by upper layers

andsor commented 8 years ago

for example, the number of realizations / initial conditions to generate etc.