diff --git a/.github/workflows/test-mlperf-inference-resnet50.yml b/.github/workflows/test-mlperf-inference-resnet50.yml index 5b742eba2..a14cc144a 100644 --- a/.github/workflows/test-mlperf-inference-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-resnet50.yml @@ -38,7 +38,7 @@ jobs: git config --system core.longpaths true - name: Install dependencies run: | - pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm" + CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - name: Test MLPerf Inference ResNet50 (Windows) if: matrix.os == 'windows-latest' @@ -59,14 +59,13 @@ jobs: - name: Push Results if: github.repository_owner == 'mlcommons' env: - USER: "GitHub Action" - EMAIL: "admin@gateoverflow.com" GITHUB_TOKEN: ${{ env.PAT }} run: | - git config --global user.name "${{ env.USER }}" - git config --global user.email "${{ env.EMAIL }}" + git config --global user.name mlcommons-bot + git config --global user.email "mlcommons-bot@users.noreply.github.com" git config --global credential.https://github.com.helper "" git config --global credential.https://github.com.helper "!gh auth git-credential" git config --global credential.https://gist.github.com.helper "" git config --global credential.https://gist.github.com.helper "!gh auth git-credential" + cm run script --tags=gh,auth,cli --with_token=${{ env.PAT }} cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet diff --git a/setup.py b/setup.py index 8cc2aec00..0e040665e 100644 --- a/setup.py +++ b/setup.py @@ -146,14 +146,18 @@ def custom_function(self): 'force': True, 'all': True}) branch = os.environ.get('CM_MLOPS_REPO_BRANCH', 'dev') - r = cmind.access({'action': 'pull', - 'automation': 'repo', - 'artifact': 'mlcommons@mlperf-automations', - 'checkout': commit_hash, - 'branch': branch}) - print(r) - if r['return'] > 0: - return r['return'] + pull_default_mlops_repo = os.environ.get( + 'CM_PULL_DEFAULT_MLOPS_REPO', 'true') + + if str(pull_default_mlops_repo).lower() not in ["no", "0", "false"]: + r = cmind.access({'action': 'pull', + 'automation': 'repo', + 'artifact': 'mlcommons@mlperf-automations', + 'checkout': commit_hash, + 'branch': branch}) + print(r) + if r['return'] > 0: + return r['return'] def get_sys_platform(self): self.system = platform.system()