Skip to content
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

Sync <- Mlperf inference #601

Merged
merged 115 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
7250039
Added get_git_version.py
arjunsuresh Nov 23, 2024
d3ed27a
Use git hash in setup.py
arjunsuresh Nov 23, 2024
abf164c
Update build_wheel.yml
arjunsuresh Nov 23, 2024
0836153
Update pyproject.toml
arjunsuresh Nov 23, 2024
2ab1824
Update pyproject.toml
arjunsuresh Nov 23, 2024
b7f230a
Update pyproject.toml
arjunsuresh Nov 23, 2024
07223db
Update setup.py
arjunsuresh Nov 23, 2024
4dd60b3
Update pyproject.toml
arjunsuresh Nov 23, 2024
65d9508
Update build_wheel.yml
arjunsuresh Nov 23, 2024
912ae6d
Merge branch 'mlperf-inference' into use-updated-setup.py
arjunsuresh Nov 23, 2024
4a2ce42
Merge pull request #600 from GATEOverflow/use-updated-setup.py
arjunsuresh Nov 23, 2024
adcd923
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
cd5b6d0
Increment version to 0.4.2
mlcommons-bot Nov 23, 2024
ad75ba1
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
f878e88
Increment version to 0.4.3
mlcommons-bot Nov 23, 2024
62d43df
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
22db986
Increment version to 0.4.4
mlcommons-bot Nov 23, 2024
2eaf195
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
0da9320
Increment version to 0.4.5
mlcommons-bot Nov 23, 2024
222f169
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
b355b29
Increment version to 0.4.6
mlcommons-bot Nov 23, 2024
1ea202e
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
5fecfa5
Increment version to 0.4.7
mlcommons-bot Nov 23, 2024
dd97f8b
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
c8c968e
Increment version to 0.4.8
mlcommons-bot Nov 23, 2024
f47f517
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
639191c
Increment version to 0.4.9
mlcommons-bot Nov 23, 2024
e68f539
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
637eebc
Increment version to 0.4.10
mlcommons-bot Nov 23, 2024
02dc932
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
9abb846
Increment version to 0.4.11
mlcommons-bot Nov 23, 2024
453c07d
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
970a48f
Increment version to 0.4.12
mlcommons-bot Nov 23, 2024
f55ab11
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
f88ab01
Increment version to 0.4.13
mlcommons-bot Nov 23, 2024
a7a339c
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
735c837
Increment version to 0.4.14
mlcommons-bot Nov 23, 2024
913c2ee
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
1ec7263
Increment version to 0.4.15
mlcommons-bot Nov 23, 2024
ac88634
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
0b481d1
Increment version to 0.4.16
mlcommons-bot Nov 23, 2024
97c45d8
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
8b9a56a
Increment version to 0.4.17
mlcommons-bot Nov 23, 2024
7f59fdf
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
aeb1d7d
Increment version to 0.4.18
mlcommons-bot Nov 23, 2024
5867af4
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
b3ecb73
Increment version to 0.4.19
mlcommons-bot Nov 23, 2024
7e0be1c
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
a27ee93
Increment version to 0.4.20
mlcommons-bot Nov 23, 2024
af053db
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
c515696
Increment version to 0.4.21
mlcommons-bot Nov 23, 2024
8f5eca5
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
958ff9e
Increment version to 0.4.22
mlcommons-bot Nov 23, 2024
ac0c030
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
b8ad73a
Increment version to 0.4.23
mlcommons-bot Nov 23, 2024
8ed8940
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
c659c66
Increment version to 0.4.24
mlcommons-bot Nov 23, 2024
15c995d
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
8fde0b7
Increment version to 0.4.25
mlcommons-bot Nov 23, 2024
00396b0
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
ac0ceda
Increment version to 0.4.26
mlcommons-bot Nov 23, 2024
d970e0b
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
70b06cb
Increment version to 0.4.27
mlcommons-bot Nov 23, 2024
8b61016
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
1e12277
Increment version to 0.4.28
mlcommons-bot Nov 23, 2024
b2ab329
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
8d7c42b
Increment version to 0.4.29
mlcommons-bot Nov 23, 2024
82f69df
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
5cdaff6
Increment version to 0.4.30
mlcommons-bot Nov 23, 2024
90e318d
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
4160b3b
Increment version to 0.4.31
mlcommons-bot Nov 23, 2024
e453078
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
0f738e3
Increment version to 0.4.32
mlcommons-bot Nov 23, 2024
5cc846e
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
325cd85
Increment version to 0.4.33
mlcommons-bot Nov 23, 2024
f619003
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
388ed27
Increment version to 0.4.34
mlcommons-bot Nov 23, 2024
a76c43d
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
754e777
Increment version to 0.4.35
mlcommons-bot Nov 23, 2024
3c8e69e
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
93ffc73
Increment version to 0.4.36
mlcommons-bot Nov 23, 2024
b18050e
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
18e66a2
Increment version to 0.4.37
mlcommons-bot Nov 23, 2024
aa791cd
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
8345fa5
Increment version to 0.4.38
mlcommons-bot Nov 23, 2024
e484899
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
87ce168
Increment version to 0.4.39
mlcommons-bot Nov 23, 2024
9fea0e9
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
7879935
Increment version to 0.4.40
mlcommons-bot Nov 23, 2024
ff499fd
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
57760c3
Increment version to 0.4.41
mlcommons-bot Nov 23, 2024
d5fd7e6
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
617586e
Increment version to 0.4.42
mlcommons-bot Nov 23, 2024
8880674
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
b4bed23
Increment version to 0.4.43
mlcommons-bot Nov 23, 2024
eec2ad4
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
c43c944
Increment version to 0.4.44
mlcommons-bot Nov 23, 2024
d3caa41
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
5fdeeea
Increment version to 0.4.45
mlcommons-bot Nov 23, 2024
0e33f5f
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
92be214
Increment version to 0.4.46
mlcommons-bot Nov 23, 2024
29ef86a
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
935555d
Increment version to 0.4.47
mlcommons-bot Nov 23, 2024
a3129d6
Update build_wheel.yml
arjunsuresh Nov 23, 2024
7d34ae5
Update build_wheel.yml | Do VERSION update before git hash update
arjunsuresh Nov 23, 2024
b6c982a
Update VERSION
arjunsuresh Nov 23, 2024
240f9cf
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
07916af
Update MANIFEST.in
arjunsuresh Nov 23, 2024
941fe11
Update VERSION
arjunsuresh Nov 23, 2024
68968dd
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
e8d0f4c
Update build_wheel.yml
arjunsuresh Nov 23, 2024
b2b7f43
Update VERSION
arjunsuresh Nov 23, 2024
94d707a
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
96af8d0
Merge branch 'main' into mlperf-inference
arjunsuresh Nov 23, 2024
ff7f6d9
Updated git_commit_hash.txt
mlcommons-bot Nov 23, 2024
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
20 changes: 14 additions & 6 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
- name: Check if VERSION file has changed
id: version_changed
run: |
if git diff --name-only HEAD~1 | grep -q "VERSION"; then
git config --global user.name mlcommons-bot
git config --global user.email "[email protected]"
if git diff --name-only $(git merge-base HEAD HEAD~1) | grep -q "VERSION"; then
echo "VERSION file has been modified"
echo "::set-output name=version_changed::true"
new_version=$(cat VERSION)
Expand Down Expand Up @@ -71,22 +73,28 @@ jobs:
- name: Commit updated version
if: steps.version_changed.outputs.version_changed == 'false'
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git add VERSION
git commit -m "Increment version to ${{ steps.do_version_increment.outputs.new_version }}"
git push

# Step 6: Install required dependencies
# Step 6: Update the git hash in the repository
- name: Commit updated git hash
run: |
python3 get_git_version.py > git_commit_hash.txt
git add git_commit_hash.txt
git commit -m "Updated git_commit_hash.txt"
git push

# Step 7: Install required dependencies
- name: Install requirements
run: python3 -m pip install setuptools wheel build

# Step 7: Build the Python wheel
# Step 8: Build the Python wheel
- name: Build wheels
working-directory: ./
run: python3 -m build && rm dist/*.whl

# Step 8: Publish to PyPI
# Step 9: Publish to PyPI
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include README.md
include VERSION
include git_commit_hash.txt
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2
0.5.0
14 changes: 14 additions & 0 deletions get_git_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import subprocess

def get_git_commit_hash():
try:
commit_hash = subprocess.check_output(
['git', 'rev-parse', 'HEAD'],
stderr=subprocess.STDOUT
).strip().decode('utf-8')
return commit_hash
except Exception:
return "unknown"

if __name__ == "__main__":
print(get_git_commit_hash())
1 change: 1 addition & 0 deletions git_commit_hash.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96af8d0b5faedcd2d06be33cb9e01d4641268458
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build-system]
requires = ["setuptools>=60", "wheel", "cmind"]
requires = ["setuptools>=60", "wheel", "cmind @ git+https://[email protected]/mlcommons/ck.git@084d4d6171a6e7ae9582a63777fbd19afa19947a#egg=cmind&subdirectory=cm"]
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ def command_exists(self, command):
return subprocess.call([command, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) == 0

def custom_function(self):
commit_hash = get_commit_hash()
import cmind
#r = cmind.access({'action':'rm', 'automation':'repo', 'data_uoa':'mlcommons@cm4mlops', 'force': True})
r = cmind.access({'action':'pull', 'automation':'repo', 'artifact':'mlcommons@cm4mlops', 'branch': 'mlperf-inference'})
r = cmind.access({'action':'pull', 'automation':'repo', 'artifact':'mlcommons@cm4mlops', 'branch': 'mlperf-inference', 'checkout': commit_hash})
#r = cmind.access({'action':'pull', 'automation':'repo', 'artifact':'mlcommons@cm4mlops', 'checkout': commit_hash})
print(r)
if r['return'] > 0:
return r['return']
Expand All @@ -148,6 +150,13 @@ def read_file(file_name, default=""):
return f.read().strip()
return default

def get_commit_hash():
try:
with open(os.path.join(os.path.dirname(__file__), 'git_commit_hash.txt'), 'r') as f:
return f.read().strip()
except FileNotFoundError:
return "unknown"

long_description = read_file("README.md", "No description available.")
version_ = read_file("VERSION", "0.3.1")

Expand Down
Loading