Appearance
systemslab evaluate
| Description | Render a SystemsLab experiment specification to JSON. |
|---|---|
| Usage | systemslab evaluate [OPTIONS] <SPEC> |
Description
systemslab evaluate renders the provided experiment specification to JSON, without talking to the systemslab server at all.
Experiment Specification
The experiment specification file describes the steps that will be taken to perform the experiment: what jobs are run, what steps each of them runs, and where they can be scheduled. The experiment specification can be written in json, yaml, or jsonnet. Which one is loaded will depend on the extension of the provided file. If the path does not have an extension then yaml will be assumed.
See the experiment specification reference for documentation of the JSON object that the experiment specification file should expand to.
Parameters
Jsonnet experiment specifications allow for parameters to be passed in from the command line when evaluating the specification. This can be done by creating a top-level function in the experiment spec, like so:
jsonnet
function(index, job = 'main') {
name: 'my-experiment-' + index,
jobs: {
[job]: {
// ...
}
}
}When you then run the command you can set these parameters by passing --param options on the command line:
bash
systemslab submit experiment.jsonnet -p index=1Arguments without defaults in the top-level function are required and will cause errors if not provided, all others are optional.
By default, all parameters passed in via the command line are strings. You can pass in numbers or booleans by explicitly specifying the parameter type:
bash
systemslab submit experiment.jsonnet -p index:number=1 -p enabled:bool=trueThe only valid parameter types are string, number, and bool.
Options
| Option | Default | Description |
|---|---|---|
-p, --param | Pass a parameter to use when evaluating the experiment specification. | |
--jpath | Add an extra include path to use when resolving jsonnet imports. | |
--jsonnet-max-stack | 200 | Limit the recursion depth that the jsonnet vm is allowed to reach when evaluating jsonnet files. |
Common Options
| Option | Default | Description |
|---|---|---|
--systemslab-url | The URL at which to access the systemslab server. | |
--color | auto | Controls when color is used in the output. Possible values are auto, always, and never. |
--output-format | long | Output format to use when outputting messages. long will result output designed to be human-readable while short is short output meant to be used within scripts. |
Environment Variables
| Variable | Description |
|---|---|
SYSTEMSLAB_URL | Specify the URL used to contact the SystemsLab server. Equivalent to --systemslab-url. |