Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
ewoks
ewoksdask
Commits
15b39199
Commit
15b39199
authored
Dec 20, 2021
by
Wout De Nolf
Browse files
support execute inputs
parent
0b536477
Changes
1
Hide whitespace changes
Inline
Side-by-side
ewoksdask/bindings.py
View file @
15b39199
...
@@ -3,7 +3,7 @@ https://docs.dask.org/en/latest/scheduler-overview.html
...
@@ -3,7 +3,7 @@ https://docs.dask.org/en/latest/scheduler-overview.html
"""
"""
import
json
import
json
from
typing
import
Optional
from
typing
import
List
,
Optional
from
dask.distributed
import
Client
from
dask.distributed
import
Client
from
dask.threaded
import
get
as
multithreading_scheduler
from
dask.threaded
import
get
as
multithreading_scheduler
from
dask.multiprocessing
import
get
as
multiprocessing_scheduler
from
dask.multiprocessing
import
get
as
multiprocessing_scheduler
...
@@ -55,7 +55,9 @@ def convert_graph(ewoksgraph, **execute_options):
...
@@ -55,7 +55,9 @@ def convert_graph(ewoksgraph, **execute_options):
def
execute_graph
(
def
execute_graph
(
graph
,
graph
,
scheduler
=
None
,
scheduler
=
None
,
inputs
:
Optional
[
List
[
dict
]]
=
None
,
results_of_all_nodes
:
Optional
[
bool
]
=
False
,
results_of_all_nodes
:
Optional
[
bool
]
=
False
,
outputs
:
Optional
[
List
[
dict
]]
=
None
,
load_options
:
Optional
[
dict
]
=
None
,
load_options
:
Optional
[
dict
]
=
None
,
**
execute_options
**
execute_options
):
):
...
@@ -66,6 +68,8 @@ def execute_graph(
...
@@ -66,6 +68,8 @@ def execute_graph(
raise
RuntimeError
(
"Dask can only execute DAGs"
)
raise
RuntimeError
(
"Dask can only execute DAGs"
)
if
ewoksgraph
.
has_conditional_links
:
if
ewoksgraph
.
has_conditional_links
:
raise
RuntimeError
(
"Dask cannot handle conditional links"
)
raise
RuntimeError
(
"Dask cannot handle conditional links"
)
if
inputs
:
ewoksgraph
.
update_default_inputs
(
inputs
)
daskgraph
=
convert_graph
(
ewoksgraph
,
**
execute_options
)
daskgraph
=
convert_graph
(
ewoksgraph
,
**
execute_options
)
if
results_of_all_nodes
:
if
results_of_all_nodes
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment