Skip to content

Commit 3ad4ac3

Browse files
authored
docs: improve documentation of workflow values yaml file (#3373)
1 parent 671d7e4 commit 3ad4ac3

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

renku/ui/cli/workflow.py

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,44 @@
129129
130130
Parameters can be set using the ``--set`` keyword or by specifying them in a
131131
values YAML file and passing that using ``--values``. In case of passing a file,
132-
the YAML should follow the this structure:
132+
for a composite workflow like:
133+
134+
.. code-block:: console
135+
136+
$ renku run --name train -- python train.py --lr=0.1 --gamma=0.5 --output=result.csv
137+
$ renku run --name eval -- python eval.py --image=graph.png --data=result.csv
138+
$ renku workflow compose --map learning_rate=train.lr --map graph=eval.image
139+
140+
the YAML file could look like:
133141
134142
.. code-block:: yaml
135143
144+
# composite (mapped) parameters
136145
learning_rate: 0.9
137-
dataset_input: dataset.csv
138-
chart_output: chart.png
139-
my-workflow:
140-
lr: 0.8
141-
lookup-table: lookup.xml
142-
my-other-workflow:
143-
language: en
146+
graph: overview.png
147+
train: # child workflow name
148+
# child workflow parameters
149+
gamma: 1.0
150+
151+
Which would rerun the two steps but with ``lr`` set to ``0.9``, ``gamma`` set to ``1.0``
152+
and the output saved under ``overview.png``.
153+
154+
Note that this would be the same as using:
155+
156+
.. code-block:: yaml
157+
158+
train:
159+
lr: 0.9
160+
gamma: 1.0
161+
eval:
162+
image: overview.png
163+
164+
For a regular (non-composite) workflow it is enough to just specify key-value pairs like:
165+
166+
.. code-block:: yaml
167+
168+
lr: 0.9
169+
gamma: 1.0
144170
145171
In addition to being passed on the command line and being available to
146172
``renku.ui.api.*`` classes in Python scripts, parameters are also set as

0 commit comments

Comments
 (0)