Skip to content

Commit

Permalink
Benchpark: use requirements.txt from Ramble (#196)
Browse files Browse the repository at this point in the history
* update ramble version used by benchpark; append requirements.txt for ramble to benchpark requirements.txt

* better interception of errors; need to create Ramble workspace log dir

* style edit

* style fix

* apparently our style checker is also a spell checker

* CI needs to install requirements.txt

* docs requirements need to extend w/ramble requirements

* get saxpy check to run when changing the checkout versions of Ramble/Spack
  • Loading branch information
scheibelp authored Apr 9, 2024
1 parent a5137d8 commit 5b6cd4a
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
- '.github/**'
- 'bin/**'
- 'configs/**'
- 'checkout-versions.yaml'
- 'experiments/**'
- 'repo/**'
license:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,18 @@ codespell==2.2.6
pandas==2.2.1
pyyaml==6.0.1
sphinxcontrib-programoutput==0.17
# The remaining requirements are from Ramble
pytest
flake8
google-cloud-storage # for gcs fetch test
google-api-core # for gcs fetch error .exceptions
coverage
pre-commit
graphlib-backport;python_version<"3.9"
urllib3==1.26.18;python_version<="3.6"
protobuf;python_version>"3.6"
protobuf==3.19.4;python_version<="3.6"
pyarrow==3.0.0;python_version<="3.6"
google-cloud-bigquery
tqdm
deprecation
4 changes: 4 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
- name: Checkout Benchpark
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633

- name: Add needed Python libs
run: |
pip install -r ./requirements.txt
- name: Build Saxpy Workspace
run: |
./bin/benchpark setup saxpy/openmp nosite-x86_64 workspace/
Expand Down
12 changes: 9 additions & 3 deletions bin/benchpark
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,20 @@ def benchpark_setup(subparsers, actions_dict):


def run_command(command_str, env=None):
result = subprocess.run(
proc = subprocess.Popen(
shlex.split(command_str),
env=env,
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
stdout, stderr = proc.communicate()
if proc.returncode != 0:
raise RuntimeError(
f"Failed command: {command_str}\nOutput: {stdout}\nError: {stderr}"
)

return (result.stdout, result.stderr)
return (stdout, stderr)


def benchpark_tags(subparsers, actions_dict):
Expand Down Expand Up @@ -348,6 +352,7 @@ def benchpark_setup_handler(args):

ramble_workspace_dir = workspace_dir / "workspace"
ramble_configs_dir = ramble_workspace_dir / "configs"
ramble_logs_dir = ramble_workspace_dir / "logs"
ramble_spack_experiment_configs_dir = (
ramble_configs_dir / "auxiliary_software_files"
)
Expand All @@ -358,6 +363,7 @@ def benchpark_setup_handler(args):
experiment_src_dir = source_dir / "experiments" / benchmark
modifier_config_dir = source_dir / "modifiers" / modifier / "configs"
ramble_configs_dir.mkdir(parents=True)
ramble_logs_dir.mkdir(parents=True)
ramble_spack_experiment_configs_dir.mkdir(parents=True)

def include_fn(fname):
Expand Down
2 changes: 1 addition & 1 deletion checkout-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# SPDX-License-Identifier: Apache-2.0

versions:
ramble: 3d6d2670435c704ca815ae13abe49b10c5111638
ramble: bb664f142b2cbdb2b2ea39e70a8535c9f27c1179
spack: 31de670bd26beca979ebd75dcb0ce90c535a78c4
15 changes: 15 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
pyyaml
# The remaining requirements are from Ramble
pytest
flake8
google-cloud-storage # for gcs fetch test
google-api-core # for gcs fetch error .exceptions
coverage
pre-commit
graphlib-backport;python_version<"3.9"
urllib3==1.26.18;python_version<="3.6"
protobuf;python_version>"3.6"
protobuf==3.19.4;python_version<="3.6"
pyarrow==3.0.0;python_version<="3.6"
google-cloud-bigquery
tqdm
deprecation

0 comments on commit 5b6cd4a

Please sign in to comment.