Skip to content

Commit

Permalink
Support generic result repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Sep 24, 2024
1 parent 694d4a4 commit 225e089
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
python-version: "3.11"

- name: Init docs site
run: INFERENCE_RESULTS_VERSION=scc24 bash docinit.sh
run: bash run.sh

- name: Run Mkdocs deploy
run: mkdocs gh-deploy --force
23 changes: 15 additions & 8 deletions docinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@ if [ ! -e overrides ]; then
test $? -eq 0 || exit $?
fi

repo_owner=${INFERENCE_RESULTS_REPO_OWNER:-mlcommons}
repo_branch=${INFERENCE_RESULTS_REPO_BRANCH:-main}
repo_name=${INFERENCE_RESULTS_REPO_NAME:-inference_results_${INFERENCE_RESULTS_VERSION}}

if [ ! -e docs/javascripts/config.js ]; then
if [ -n "${INFERENCE_RESULTS_VERSION}" ]; then
echo "const results_version=\"${INFERENCE_RESULTS_VERSION}\";" > docs/javascripts/config.js;
ver_num=`echo ${INFERENCE_RESULTS_VERSION} | tr -cd '0-9'`
echo "const dbVersion =\"${ver_num}\";" >> docs/javascripts/config.js;
else
echo "Please export INFERENCE_RESULTS_VERSION=v4.1 or the corresponding version";
exit 1
fi
if [ -n "${INFERENCE_RESULTS_VERSION}" ]; then
echo "const results_version=\"${INFERENCE_RESULTS_VERSION}\";" > docs/javascripts/config.js;
echo "const repo_owner=\"${repo_owner}\";" >> docs/javascripts/config.js;
echo "const repo_branch=\"${repo_branch}\";" >> docs/javascripts/config.js;
echo "const repo_name=\"${repo_name}\";" >> docs/javascripts/config.js;
ver_num=`echo ${INFERENCE_RESULTS_VERSION} | tr -cd '0-9'`
echo "const dbVersion =\"${ver_num}\";" >> docs/javascripts/config.js;
else
echo "Please export INFERENCE_RESULTS_VERSION=v4.1 or the corresponding version";
exit 1
fi
fi

if [ ! -e docs/thirdparty/tablesorter ]; then
Expand Down
1 change: 1 addition & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INFERENCE_RESULTS_VERSION=scc24 INFERENCE_RESULTS_REPO_OWNER=GATEOverflow INFERENCE_RESULTS_REPO_BRANCH=mlperf-inference-results-scc24 INFERENCE_RESULTS_REPO_NAME=cm4mlperf-inference bash docinit.sh

0 comments on commit 225e089

Please sign in to comment.