From 8d9b90312105ef1dcb46b3ff8bd230c548860a10 Mon Sep 17 00:00:00 2001 From: wconstab Date: Wed, 2 Dec 2020 09:35:30 -0800 Subject: [PATCH 1/2] Update run_bench_and_upload.sh --- scripts/run_bench_and_upload.sh | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/scripts/run_bench_and_upload.sh b/scripts/run_bench_and_upload.sh index 7f224554aa..ca2d2b2c6e 100755 --- a/scripts/run_bench_and_upload.sh +++ b/scripts/run_bench_and_upload.sh @@ -34,29 +34,23 @@ else python scripts/upload_scribe.py --pytest_bench_json ${BENCHMARK_ABS_FILENAME} --torchbench_score ${TORCHBENCH_SCORE} fi - -git clone https://github.com/wconstab/pytorch_benchmark_data -pushd pytorch_benchmark_data -git config --global user.name "pytorchbot" -git config --global --unset url.ssh://git@github.com.insteadof || true - # Store the files with respect to the repo that their hash refers to # separate master and pull_requests just for conveneince in the UI if [ "$CIRCLE_BRANCH" = "master" ] then + git clone https://github.com/wconstab/pytorch_benchmark_data + pushd pytorch_benchmark_data + git config --global user.name "pytorchbot" + git config --global --unset url.ssh://git@github.com.insteadof || true SUBDIR="${CIRCLE_PROJECT_REPONAME}/master" -else - SUBDIR="${CIRCLE_PROJECT_REPONAME}/pull_requests" -fi -mkdir -p $SUBDIR/ -cp ${BENCHMARK_ABS_FILENAME} $SUBDIR/ -git add ${SUBDIR}/${BENCHMARK_FILENAME} -if [ "$CIRCLE_BRANCH" = "master" ] -then + mkdir -p $SUBDIR/ + cp ${BENCHMARK_ABS_FILENAME} $SUBDIR/ + git add ${SUBDIR}/${BENCHMARK_FILENAME} ln -s -f ${SUBDIR}/${BENCHMARK_FILENAME} ${SUBDIR}/latest echo ${BENCHMARK_FILENAME} >> ${SUBDIR}/history git add ${SUBDIR}/latest ${SUBDIR}/history + git commit -m"Add ${BENCHMARK_FILENAME} - to reproduce results, see pytorch and machine versions in .json" + git push origin master fi -git commit -m"Add ${BENCHMARK_FILENAME} - to reproduce results, see pytorch and machine versions in .json" -git push origin master -popd \ No newline at end of file + +popd From 2df3aa0ceef80f729dcdbbff85abe143dd19fa13 Mon Sep 17 00:00:00 2001 From: wconstab Date: Wed, 2 Dec 2020 14:18:37 -0800 Subject: [PATCH 2/2] fix popd --- scripts/run_bench_and_upload.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_bench_and_upload.sh b/scripts/run_bench_and_upload.sh index ca2d2b2c6e..aa5310aaa6 100755 --- a/scripts/run_bench_and_upload.sh +++ b/scripts/run_bench_and_upload.sh @@ -51,6 +51,6 @@ then git add ${SUBDIR}/latest ${SUBDIR}/history git commit -m"Add ${BENCHMARK_FILENAME} - to reproduce results, see pytorch and machine versions in .json" git push origin master + popd fi -popd