Skip to content

Commit baca603

Browse files
committed
cleanup generate_input_paths
1 parent 589347f commit baca603

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

metaflow/plugins/argo/generate_input_paths.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
from hashlib import md5
33

44

5-
def generate_input_paths(step_name, timestamp, input_paths, max_splits):
5+
def generate_input_paths(step_name, timestamp, input_paths, split_cardinality):
66
# => run_id/step/:foo,bar
77
run_id = input_paths.split("/")[0]
88
foreach_base_id = "{}-{}-{}".format(step_name, timestamp, input_paths)
99

10-
ids = [_generate_task_id(foreach_base_id, i) for i in range(int(max_splits))]
10+
ids = [_generate_task_id(foreach_base_id, i) for i in range(int(split_cardinality))]
1111
return "{}/{}/:{}".format(run_id, step_name, ",".join(ids))
1212

1313

1414
def _generate_task_id(base, idx):
15-
# For foreach splits generate the expected input-paths based on max_split and base_id via.
15+
# For foreach splits generate the expected input-paths based on split_cardinality and base_id.
1616
# newline required at the end due to 'echo' appending one in the shell side task_id creation.
1717
task_str = "%s-%s\n" % (base, idx)
1818
hash = md5(task_str.encode("utf-8")).hexdigest()[-8:]

0 commit comments

Comments
 (0)