Skip to content
Snippets Groups Projects
Commit abd6386c authored by Ivan Kondov's avatar Ivan Kondov
Browse files

add docs about rerun, cancel and update

parent d82f7671
No related branches found
No related tags found
1 merge request!334Resolve "Detect unreserved and lost launches and show more metadata in overview"
Pipeline #418036 passed
......@@ -133,6 +133,7 @@ magic commands | action
`%new` | create a new session and a new model
`%hist`, `%history` | print the current model source
`%rerun var1[, var2][, ...]` | re-evaluate var1, var2, etc.
`%cancel var1[, var2][, ...]` | cancel evaluation of var1, var2, etc.
`%vary` | print the [varied parameters](bulk.md#bulk-processing)
`%tag` | print the [tag section](query.md#the-tag-statement)
`%find <query> [action]` | perform a global [search](query.md#the-find-command)
......@@ -142,6 +143,30 @@ The `%history` command prints all statements (without `print` statements that ar
The `%rerun var` command can be used to re-evaluate the parameter of a variable `var` and its descendants, i.e. all parameters containing references to `var`. This is useful when there was some error during evaluation of `var` that was not due to the provided input to `var` but due to side effects, for example there was a computing node or file system failure, network or power outage etc.
The `%cancel var` command can be used to suspend the evaluation of the parameter of a variable `var`. Depending on the state, the final state of the variable will be different. The possible uses of the `%rerun` and `%cancel` magics, and the [variable update operator](scl.md#dealing-with-failures) (`:=`) are summarized in the following table:
original state | final state | magic / operator
----------------|--------------|--------------------
ARCHIVED | - | -
FIZZLED | WAITING | `%rerun`, `:=`
FIZZLED | DEFUSED | `%cancel`
DEFUSED | WAITING | `%rerun`, `:=`
PAUSED | WAITING | `%rerun`, `:=`
PAUSED | DEFUSED | `%cancel`
WAITING | WAITING | `:=`
WAITING | PAUSED | `%cancel`
READY | READY | `:=`
READY | PAUSED | `%cancel`
RESERVED | WAITING | `%rerun`
RESERVED | PAUSED | `%cancel`
RUNNING | WAITING | `%rerun`
RUNNING | DEFUSED | `%cancel`
COMPLETED | WAITING | `%rerun`, `:=`
**Note**: If the final state is WAITING and all referenced variables are in COMPLETED states then the final state is automatically changed to READY.
**Note**: Variables in ARCHIVED state cannot be updated.
### Duplicate detection
Both *script* and *session* modes have a duplicate detection feature to identify variables in other persistent models that have identical names, parameters and values. This feature ensures safe reuse of such variables and helps to avoid unnecessary repeated evaluations. The duplicate detection can be used in any model but particularly useful in the cases of [sub-model reuse](submodel.md) and of [bulk processing](bulk.md).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment