feat(eager): Eager & Execute for easier debugging #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ Feature: Eager & Execute for easier debugging
Description
Provides ability to eagerly evaluate or execute a lazy evaluation.
Eager: that is, never to use laziness at all and the task/workflow decorator calls the wrapped function immediately.
Execute: once a lazy evaluation exists (e.g. workflow result) calling execute gets a value from it, without using the backend (i.e. by calling all the functions).
The difference between
execute
and normal dask evaluation is that dewret does not use an executor, and simply calls the functions recursively, which may simplify debugging.Changes Made
--eager
to get an immediate result printed tostdout
.execute
to workflow, that will call any tasks to get a final result after the workflow/task is constructed.test_executions.py
: script to confirm the new functionalityAdditional Information
Requested given the nonlinear nature of debugging. This has been confirmed to allow step-wise debugging in PyCharm, by adding
--eager
into the command line.Tip: adding
DEFAULT_WORKFLOW = workflow_to_test
to the bottom of a workflow file, and making the command-line for debugging to be-m dewret $FilePath$ DEFAULT_WORKFLOW --eager
will save having to change the configuration to swap between debugged workflows.Checklist
Who can review?
@KamenDimitrov97 @elleryames (written by @philtweir and @edufnt )