Skip to content

Commit

Permalink
Merge pull request #247 from galaxyproject/169-run-number
Browse files Browse the repository at this point in the history
Run numbering
  • Loading branch information
ksuderman authored Dec 13, 2023
2 parents b9a62b6 + 7487c89 commit 090c70b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions abm/lib/experiment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import argparse
import json
import logging
import os
Expand Down Expand Up @@ -26,18 +27,20 @@ def run(context: Context, args: list):
:return: True if the benchmarks completed sucessfully. False otherwise.
"""
parser = argparse.ArgumentParser()
parser.add_argument('benchmark_path')
parser.add_argument('-r', '--run-number', default=-1)
argv = parser.parse_args(args)

if len(args) == 0:
print("ERROR: No benchmarking configuration provided.")
return False
benchmark_path = argv.benchmark_path

benchmark_path = args[0]
if not os.path.exists(benchmark_path):
print(f"ERROR: Benchmarking configuration not found {benchmark_path}")
return False

with open(benchmark_path, 'r') as f:
config = yaml.safe_load(f)
config['start_at'] = argv.run_number

profiles = load_profiles()
# latch = CountdownLatch(len(config['cloud']))
Expand Down Expand Up @@ -66,6 +69,10 @@ def run_on_cloud(cloud: str, config: dict):
context = Context(cloud)
namespace = 'galaxy'
chart = 'anvil/galaxykubeman'
start = config['start_at']
if start < 0:
start = 1
end = start + config['runs']
if 'galaxy' in config:
namespace = config['galaxy']['namespace']
chart = config['galaxy']['chart']
Expand Down
6 changes: 3 additions & 3 deletions abm/lib/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
- name: [wait]
help: Wait for a job to finish running
handler: job.wait
params: ID
params: "ID [-T|--timeout SECONDS]"
- name: [ metrics, stats ]
help: display runtime metrics for the job, or a list of jobs contained in a history
handler: job.metrics
Expand Down Expand Up @@ -244,9 +244,9 @@
standalone: true
menu:
- name: [run]
help: run all benchmarks in an experiment
help: run all benchmarks in an experiment. Use --run-number to specify staring counter.
handler: experiment.run
params: PATH
params: "PATH [-r|--run-number N]"
- name: [summarize, summary]
help: summarize metrics to a CSV or TSV file.
handler: experiment.summarize
Expand Down

0 comments on commit 090c70b

Please sign in to comment.