diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index df1910211..7763f800f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -17,9 +17,10 @@ jobs: if: github.repository_owner == 'mlcommons' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 2 + ssh-key: ${{ secrets.DEPLOY_KEY }} # Check if VERSION.txt file has changed in this push - name: Check if VERSION.txt file has changed diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 1f24dc38b..b98a3c37b 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -14,6 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Python ${{ env.python_version }} uses: actions/setup-python@v3 with: @@ -31,20 +33,17 @@ jobs: - name: Format Codebase run: | git remote add upstream ${{ github.event.pull_request.base.repo.clone_url }} - git fetch upstream + 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 }}" - name: Commit run: | - cd ${GITHUB_WORKSPACE} HAS_CHANGES=$(git diff --staged --name-only) if [ ${#HAS_CHANGES} -gt 0 ]; then - git log + git checkout -B "${{ github.head_ref }}" git config --global user.email "${{ github.actor }}@users.noreply.github.com" git config --global user.name "${{ github.actor }}" git commit -m '[Automated Commit] Format Codebase' - git push + git push origin "${{ github.head_ref }}" fi - - diff --git a/text_to_image/backend_pytorch.py b/text_to_image/backend_pytorch.py index 1a45c1ca5..36e2b8009 100644 --- a/text_to_image/backend_pytorch.py +++ b/text_to_image/backend_pytorch.py @@ -84,7 +84,6 @@ def load(self): scheduler=self.scheduler, safety_checker=None, add_watermarker=False, - variant="fp16" if (self.dtype == torch.float16) else None, torch_dtype=self.dtype, ) # self.pipe.unet = torch.compile(self.pipe.unet, mode="reduce-overhead", fullgraph=True) diff --git a/text_to_image/tools/fid/fid_score.py b/text_to_image/tools/fid/fid_score.py index 2c3f1aab7..febc12ff5 100644 --- a/text_to_image/tools/fid/fid_score.py +++ b/text_to_image/tools/fid/fid_score.py @@ -32,7 +32,6 @@ limitations under the License. """ -from inception import InceptionV3 from torch.nn.functional import adaptive_avg_pool2d from scipy import linalg from PIL import Image @@ -45,8 +44,8 @@ import pathlib import os import sys - -sys.path.append(os.path.dirname(__file__)) +sys.path.insert("..", 0) +from inception import InceptionV3 # noqa: E402 try: