Skip to content

Commit

Permalink
Additional param to enable running copies of same pipeline concurrent…
Browse files Browse the repository at this point in the history
…ly (kubeflow#828)

Signed-off-by: ted chang <htchang@us.ibm.com>
  • Loading branch information
tedhtchang authored Jan 20, 2022
1 parent afe05fb commit 7938548
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions sdk/python/tests/perf_test_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
pipeline_scripts:
- name: "Flip-Coin-samples"
path: "sdk/python/tests/compiler/testdata/condition_sample.py" # condition with simple python
# copies: 10 # Create multiple copies of same pipeline. It can be used with NUM_WORKERS env to Run same pipeline concurrently.
- name: "Flip-Coin-Custom-Task-samples"
path: "sdk/python/tests/compiler/testdata/condition_custom.py" # custom task condition with simple python
- name: "Trusted-AI-samples"
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/tests/performance_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def load_pipeline_scripts() -> [(Path, str)]:

path = path_name_dict["path"]
name = path_name_dict.get("name") or Path(path).stem

copies = path_name_dict.get("copies", 1)
if not path.startswith(pathsep):
# path assumed to be relative to project root
fp: Path = project_dir.joinpath(path)
Expand All @@ -267,8 +267,8 @@ def load_pipeline_scripts() -> [(Path, str)]:
fp = Path(path)

assert fp.exists(), f"Cannot find file: {fp.resolve()}"

pipeline_files_with_name.append((fp, name))
for i in range(int(copies)):
pipeline_files_with_name.append((fp, f'{name}{i}'))

print(f"Loaded {len(pipeline_files_with_name)} pipelines from {TEST_CONFIG}\n")

Expand Down

0 comments on commit 7938548

Please sign in to comment.