Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/scripts/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ CONFIG_VER=v0
RUN_SCRIPT=$1
CONFIG_DIR=${PWD}/score/configs/${CONFIG_VER}
CONFIG_ENV=${CONFIG_DIR}/config-${CONFIG_VER}.env
DATA_DIR=${HOME}/benchmark-results/gh${GITHUB_RUN_ID}
# Use the latest pytorch-benchmark image
TORCH_IMAGE_ID=torchbench/pytorch-benchmark:latest
if [ -z "$2" ]; then
DATA_DIR=${HOME}/benchmark-results/gh${GITHUB_RUN_ID}
else
DATA_DIR=$2
fi

# Load environment variables
set -a;
Expand Down
18 changes: 18 additions & 0 deletions .github/scripts/run-sweep-benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

set -xeo pipefail

for CONFIG in /output/configs/*; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does /output/configs come from? and what what is the format of CONFIG?

Copy link
Contributor Author

@xuzhao9 xuzhao9 Dec 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/output/configs is defined in as a list of "requirements.txt" files, e.g. "requirements-1.6.0.dev20200526.txt". Inside this txt file is the urls of torch/torchtext/torchvision wheels, for example, "requirements-1.6.0.dev20200526.txt" contains three lines:
https://download.pytorch.org/whl/nightly/cu102/torch-1.6.0.dev20200526-cp37-cp37m-linux_x86_64.whl
https://download.pytorch.org/whl/nightly/cu102/torchvision-0.7.0.dev20200526-cp37-cp37m-linux_x86_64.whl
https://download.pytorch.org/whl/nightly/cu102/../torchtext-0.6.0.dev20200526-cp37-cp37m-linux_x86_64.whl

# Create a new conda version from base
CONFIG_BASE=$(basename ${CONFIG})
CONFIG_VER=$(echo ${CONFIG} | sed 's/.*-\(.*\)\.txt/\1/')
conda create --name ${CONFIG_VER} python=3.7
. activate ${CONFIG_VER}
pip install -r $CONFIG
pushd /workspace/benchmark
# workaround the maskrcnn_benchmark undefined symbol problem
find . -name "*.so" -delete
python install.py
bash /workspace/benchmark/.github/scripts/run-benchmark.sh
done

11 changes: 11 additions & 0 deletions .github/scripts/run-sweep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -xeo pipefail

SWEEP_DIR="${HOME}/nightly-sweep"

# Run benchmark
bash ./.github/scripts/run-docker.sh \
/workspace/benchmark/.github/scripts/run-sweep-benchmark.sh \
${SWEEP_DIR}

9 changes: 9 additions & 0 deletions .github/workflows/sweep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: pytorch-nightly-sweep
on:
workflow_dispatch:

jobs:
run-sweep:
runs-on: [self-hosted, bm-ec2]
steps:
- run: bash ./.github/scripts/run-sweep.sh