Skip to content

Commit

Permalink
Port (#111)
Browse files Browse the repository at this point in the history
* fix: bug with map iterate on

* fix: Porting to 3.7

* fix: Porting to 3.7

* fix: test compatibility between 3.7 and 3.8
  • Loading branch information
vijayvammi authored Jun 5, 2023
1 parent a7133fe commit 38ccf63
Show file tree
Hide file tree
Showing 5 changed files with 525 additions and 557 deletions.
7 changes: 4 additions & 3 deletions magnus/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,13 +975,14 @@ def execute_as_graph(self, executor, map_variable: dict = None, **kwargs):
map_variable (dict): The map variables the graph belongs to
**kwargs: Optional kwargs passed around
"""
run_log = executor.run_log_store.get_run_log_by_id(executor.run_id)
if self.iterate_on not in run_log.parameters:
iterate_on = None
try:
iterate_on = executor.run_log_store.get_parameters(executor.run_id)[self.iterate_on]
except KeyError:
raise Exception(
f"Expected parameter {self.iterate_on} not present in Run Log parameters, was it ever set before?"
)

iterate_on = run_log.parameters[self.iterate_on]
if not isinstance(iterate_on, list):
raise Exception("Only list is allowed as a valid iterator type")

Expand Down
Loading

0 comments on commit 38ccf63

Please sign in to comment.