Skip to content

Batch XML format proposal #18

@ajc158

Description

@ajc158

I am putting this here for posterity.

I think that we need another layer in SpineML for describing Batch operations on Experiments. This layer would be structured similarly to a Component, as a dynamical system of experiments which uses the a set of pre-defined values or the experimental logs to determine what experiment to call next and how to parameterise it. Here are two examples:

  1. simple batch with parameter range:
    Go through the parameters and apply them in turn to a single experiment...
<SpineML>
  <Batch initial_experiment="expt1">
    <RunExperiment name="expt1" url="experiment1.xml">
      <SetProperty ref="prop1">
        <Range start="1" end="2" step="+0.1"/> <!-- Built-in - but could be extensible in later versions -->
        <!--  Nested SetProperty means 'for each of the outer properties' -->
        <SetProperty ref="prop2">
           ...
        </SetProperty>
      </SetProperty>
    </RunExperiment>
  </Batch>
</SpineML
  1. parameter search:
    Try and minimise some value by searching through a parameter space... analyse the results once all of them are in
<SpineML>
  <Batch initial_experiment="expt1">
    <RunExperiment name="expt1" url="experiment1.xml">
      <SetProperty ref="prop1">
        <FromInput initial_value=0.2/>
      </SetProperty>
      <SetProperty ref="prop2">
        <FromInput initial_value=0.4/>
      </SetProperty>
      <Condition url="analyse1.py">
        <Input name="in1">
          <!--OLDLogRef run_name="current()" target="Pop1" port="V" indices="1-3" time="2-200"/-->
          <LogRef run_name="current()" target="output_name_a"/>
        </Input>
        <If value="True">
          <TriggerRunExperiment name="expt1">
            <Connect src="value0" dst="prop1"/>
          </TriggerRunExperiment>
        </If>
        <If value="False">
          <GotoEnd/>
        </If>
      </Condition>
    </RunExperiment>
    <End>
      <Analyse>
        <Input name="in1">
          <!--OLDLogRef run_name="batch()" target="Pop1" port="V" indices="all" time="2"/-->
          <LogRef run_name="batch()" target="output_name_1"/>
        </Input>
        <Input name="in2">
          <!--OLDLogRef run_name="current()" target="Pop2" port="V" indices="1-3" time="2-200"/-->
          <LogRef run_name="current()" target="output_name_2"/>
        </Input>
        <Output name="MyNewAnalysisLog"/>
      </Analyse>
    </End>
  </Batch>
</SpineML

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions