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
|
||||
|
||||
stdexp = callPackage ./stdexp.nix {
|
||||
inherit (bsc.garlic) targetMachine stages;
|
||||
inherit (bsc.garlic) targetMachine stages pp;
|
||||
};
|
||||
|
||||
# Execution stages
|
||||
|
@ -8,6 +8,7 @@
|
||||
, writeTextFile
|
||||
, runCommandLocal
|
||||
, python
|
||||
, pp
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
@ -19,17 +20,23 @@ in
|
||||
rec {
|
||||
/* Takes a list of units and builds an experiment, after executing the
|
||||
trebuchet, runexp and isolate stages. Returns the trebuchet stage. */
|
||||
buildTrebuchet = units: stages.trebuchet {
|
||||
inherit (machineConf) nixPrefix sshHost;
|
||||
nextStage = stages.runexp {
|
||||
inherit (machineConf) nixPrefix;
|
||||
nextStage = stages.isolate {
|
||||
buildTrebuchet = units:
|
||||
let
|
||||
trebuchet = stages.trebuchet {
|
||||
inherit (machineConf) nixPrefix sshHost;
|
||||
nextStage = stages.runexp {
|
||||
inherit (machineConf) nixPrefix;
|
||||
nextStage = stages.experiment {
|
||||
inherit units;
|
||||
nextStage = stages.isolate {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user