Skip to content

Improve setup.py #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 3, 2025
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
9 changes: 4 additions & 5 deletions .github/workflows/test-mlperf-inference-resnet50.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
20 changes: 12 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading