stdexp: add result and timetable targets
These targets allow one experiment to directly refer to another experiment results, thus a dependency chain can be formed to ensure execution order. It also simplifies the dataset definition, as they can be automatically fetched from the experiment directly.
This commit is contained in:
parent
b453c12253
commit
e89139284a
@ -69,7 +69,7 @@
|
|||||||
# Load some helper functions to generate app variants
|
# Load some helper functions to generate app variants
|
||||||
|
|
||||||
stdexp = callPackage ./stdexp.nix {
|
stdexp = callPackage ./stdexp.nix {
|
||||||
inherit (bsc.garlic) targetMachine stages;
|
inherit (bsc.garlic) targetMachine stages pp;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Execution stages
|
# Execution stages
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
, writeTextFile
|
, writeTextFile
|
||||||
, runCommandLocal
|
, runCommandLocal
|
||||||
, python
|
, python
|
||||||
|
, pp
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -19,17 +20,23 @@ in
|
|||||||
rec {
|
rec {
|
||||||
/* Takes a list of units and builds an experiment, after executing the
|
/* Takes a list of units and builds an experiment, after executing the
|
||||||
trebuchet, runexp and isolate stages. Returns the trebuchet stage. */
|
trebuchet, runexp and isolate stages. Returns the trebuchet stage. */
|
||||||
buildTrebuchet = units: stages.trebuchet {
|
buildTrebuchet = units:
|
||||||
inherit (machineConf) nixPrefix sshHost;
|
let
|
||||||
nextStage = stages.runexp {
|
trebuchet = stages.trebuchet {
|
||||||
inherit (machineConf) nixPrefix;
|
inherit (machineConf) nixPrefix sshHost;
|
||||||
nextStage = stages.isolate {
|
nextStage = stages.runexp {
|
||||||
inherit (machineConf) nixPrefix;
|
inherit (machineConf) nixPrefix;
|
||||||
nextStage = stages.experiment {
|
nextStage = stages.isolate {
|
||||||
inherit units;
|
inherit (machineConf) nixPrefix;
|
||||||
|
nextStage = stages.experiment {
|
||||||
|
inherit units;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in trebuchet // rec {
|
||||||
|
result = pp.resultFromLauncher (pp.launcher trebuchet);
|
||||||
|
timetable = pp.timetable result;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Given an attrset of lists `varConf` and a function `genConf` that accepts a
|
/* Given an attrset of lists `varConf` and a function `genConf` that accepts a
|
||||||
|
Loading…
Reference in New Issue
Block a user