metaflow 2.17.3__py2.py3-none-any.whl → 2.17.4__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,6 +222,9 @@ class TaskDataStore(object):
222
222
  @property
223
223
  def pathspec_index(self):
224
224
  idxstr = ",".join(map(str, (f.index for f in self["_foreach_stack"])))
225
+ if "_iteration_stack" in self:
226
+ itrstr = ",".join(map(str, (f for f in self["_iteration_stack"])))
227
+ return "%s/%s[%s][%s]" % (self._run_id, self._step_name, idxstr, itrstr)
225
228
  return "%s/%s[%s]" % (self._run_id, self._step_name, idxstr)
226
229
 
227
230
  @property
metaflow/graph.py CHANGED
@@ -478,7 +478,9 @@ class FlowGraph(object):
478
478
  cur_name = cur_node.matching_join
479
479
  elif node_type == "split-switch":
480
480
  all_paths = [
481
- populate_block(s, end_name) for s in cur_node.out_funcs
481
+ populate_block(s, end_name)
482
+ for s in cur_node.out_funcs
483
+ if s != cur_name
482
484
  ]
483
485
  resulting_list.append(all_paths)
484
486
  cur_name = end_name
metaflow/lint.py CHANGED
@@ -175,6 +175,8 @@ def check_for_acyclicity(graph):
175
175
 
176
176
  def check_path(node, seen):
177
177
  for n in node.out_funcs:
178
+ if node.type == "split-switch" and n == node.name:
179
+ continue
178
180
  if n in seen:
179
181
  path = "->".join(seen + [n])
180
182
  raise LintWarn(
@@ -241,6 +243,8 @@ def check_split_join_balance(graph):
241
243
  elif node.type == "split-switch":
242
244
  # For a switch, continue traversal down each path with the same stack
243
245
  for n in node.out_funcs:
246
+ if node.type == "split-switch" and n == node.name:
247
+ continue
244
248
  traverse(graph[n], split_stack)
245
249
  return
246
250
  elif node.type == "end":
@@ -293,6 +297,8 @@ def check_split_join_balance(graph):
293
297
  new_stack = split_stack
294
298
 
295
299
  for n in node.out_funcs:
300
+ if node.type == "split-switch" and n == node.name:
301
+ continue
296
302
  traverse(graph[n], new_stack)
297
303
 
298
304
  traverse(graph["start"], [])