-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…1948) * Update generate_final_report.py * Fix sdxl (#1911) * Fix typo in fid_score.py, fail_safe for SDXL short runs * [Automated Commit] Format Codebase * Fix typo in fid_score.py, fail_safe for SDXL short runs * Fix dlrmv2 reference implementation | Update run_local.sh * Fixes for filtering invalid results * [Automated Commit] Format Codebase * Update preprocess_submission.py * Added an option to pass in sample_ids.txt for SDXL accuracy check * [Automated Commit] Format Codebase * Update accuracy_coco.py * [Automated Commit] Format Codebase * Fix typo * Not use default for sample_ids.txt * Update requirements.txt (#1907) Updating the pip packages * Fix preprocess_sudbmission for a bug * Update submission_checker.py | Removed TEST05 * Fix to SDXL accuracy output * Added exists checks for rmtree in preprocess_submission script * [Automated Commit] Format Codebase * Delete .github/workflows/format.yml * Delete .github/scripts directory * Update build_wheels.yml | Added src distribution * Update VERSION.txt * Update build_wheels.yml * Update VERSION.txt * Update pyproject.toml * Increment version to 4.1.26 * Update MANIFEST.in * Increment version to 4.1.27 * Update pyproject.toml * Increment version to 4.1.28 * Update build_wheels.yml * Update VERSION.txt * Update accuracy_coco.py * Making sdxl run thread safe * Create format.yml | Run format on push instead of PR --------- Co-authored-by: arjunsuresh <arjunsuresh@users.noreply.github.com>
- Loading branch information
1 parent
feca9f6
commit b6f5a34
Showing
11 changed files
with
123 additions
and
126 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,60 @@ | ||
# Automatic code formatting | ||
name: "format" | ||
name: "Code formatting" | ||
on: | ||
pull_request: | ||
branches: [ master ] | ||
types: [opened, closed, synchronize] | ||
|
||
push: | ||
branches: | ||
- "**" | ||
|
||
env: | ||
python_version: "3.9" | ||
HEAD_REF: ${{ github.head_ref }} | ||
|
||
jobs: | ||
format-code: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.DEPLOY_KEY }} | ||
- name: Set up Python ${{ env.python_version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ env.python_version }} | ||
|
||
- name: Install dependencies | ||
- name: Format modified python files | ||
env: | ||
filter: ${{ github.event.before }} | ||
run: | | ||
python3 -m pip install autopep8 | ||
for FILE in $(git diff --name-only $filter | grep -E '.*\.py$') | ||
do | ||
# Check if the file still exists in the working tree | ||
if [ -f "$FILE" ]; then | ||
autopep8 --in-place -a "$FILE" | ||
git add "$FILE" | ||
fi | ||
done | ||
- name: Grant permissions | ||
run: | | ||
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/format-cpp.sh" | ||
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/format-py.sh" | ||
- name: Format Codebase | ||
- name: Format modified C++ files | ||
env: | ||
filter: ${{ github.event.before }} | ||
run: | | ||
git remote add upstream ${{ github.event.pull_request.base.repo.clone_url }} | ||
git fetch upstream ${{ github.event.pull_request.base.ref }} | ||
".github/scripts/format-cpp.sh" "upstream" "${{ github.event.pull_request.base.ref }}" | ||
".github/scripts/format-py.sh" "upstream" "${{ github.event.pull_request.base.ref }}" | ||
for FILE in $(git diff --name-only $filter | grep -E '.*\.(cc|cpp|h|hpp)$') | ||
do | ||
# Check if the file still exists in the working tree | ||
if [ -f "$FILE" ]; then | ||
clang-format -i -style=file $FILE | ||
git add $FILE | ||
fi | ||
done | ||
- name: Commit | ||
- name: Commit and push changes | ||
run: | | ||
HAS_CHANGES=$(git diff --staged --name-only) | ||
if [ ${#HAS_CHANGES} -gt 0 ]; then | ||
git checkout -B "$HEAD_REF" | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.name mlcommons-bot | ||
git config --global user.email "mlcommons-bot@users.noreply.github.com" | ||
# Commit changes | ||
git commit -m '[Automated Commit] Format Codebase' | ||
git push origin "$HEAD_REF" | ||
fi | ||
git push | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include VERSION.txt | ||
include mlperf.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.1.24 | ||
4.1.29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.