Skip to content

Commit 3a64822

Browse files
committed
Update README.md
1 parent 318f551 commit 3a64822

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,38 @@ Where each notebook given to millrun will execute against each dictionary in the
140140
This format is offered as a convenience format. Internally, it is converted into "Format 1" prior to execution.
141141

142142

143+
## CLI Profile execution
144+
145+
As of v0.2.0, `millrun` allows the creation of a "profiles" yaml file which prevents the need for typing really long commands on the command line, especially if, for a particular project, the commands are always going to be the same.
146+
147+
YAML format:
148+
149+
The format basically describes the kwargs required to execute the command.
150+
151+
The top level keys can be arbitrarily named but they represent one command execution.
152+
The values underneath each top level key are the kwargs of the command.
153+
154+
The only required values are `notebook_dir_or_file` and `notebook_params`. All other params are optional.
155+
156+
```yaml
157+
notebook1: # This is the name of the profile. A profile is equal to one command on the command line
158+
notebook_dir_or_file: ./notebook1/notebook1.ipynb # Req'd
159+
notebook_params: ./notebook1/notebook1_params.json # Req'd
160+
output_dir: ./notebook1/output # Optional
161+
prepend: # Optional
162+
- name
163+
- design
164+
append: # Optional
165+
- executed
166+
167+
notebook2: # This profile will be executed immediately after the first profile. It's like running the command again.
168+
notebook_dir_or_file: ./notebook2
169+
notebook_params: ./notebook2/notebook2_params.json
170+
output_dir: ./notebook2/output
171+
prepend:
172+
- tester
173+
```
174+
143175
## CLI parallel execution
144176
145177
Since millrun iterates over two dimensions (each notebook and then dict of parameters in the list), there are two ways of parellelizing:
@@ -153,7 +185,6 @@ However, this method becomes inefficient if you have MANY notebooks and only 1-3
153185
154186
If you need this use case then feel free to raise an issue and/or contribute a PR to implement it as an option for execution.
155187
156-
157188
## Troubleshooting
158189
159190
There seems to be an un-planned-for behaviour (by me) with the parallel execution where if there is an error in the execution process, that iteration is simply skipped. I don't have any `try`/`except` in the code that causes this.

0 commit comments

Comments
 (0)