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

Add osx-arm64 platform to conda-lock.yml file and GitHub Actions CI #164

Merged
merged 13 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.11"]
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-12, macos-14]
defaults:
run:
shell: bash -l {0}
Expand All @@ -41,3 +41,5 @@ jobs:
run: |
micromamba install python=${{ matrix.python-version }} pytest
python -m pytest --verbose src/tests/
env:
PYTORCH_MPS_PREFER_METAL: 0 # disable MPS which doesn't work on macos-14 runner
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This disables MPS for all platforms in the matrix. Is that what you want, or do you want to disable it only for macos-14?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MPS is only available on macos-14, and I've added an if-condition in the unit tests to only disable MPS on devices with MPS, so should be ok? Open to a better way of doing things though.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. I suppose the comment may have thrown me off. Here, "doesn't work" doesn't mean that we can't choose to use it, but rather that when we do choose to use it, the test fails due to running out of memory. So it would work if we had enough memory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, maybe I can reword it a little bit, how about this:

Suggested change
env:
PYTORCH_MPS_PREFER_METAL: 0 # disable MPS which doesn't work on macos-14 runner
env:
PYTORCH_MPS_PREFER_METAL: 0 # disable MPS which runs out of memory on macos-14 runner

We disable MPS because it runs out of memory (or rather, it doesn't allow allocating GPU-like MPS memory?) on the macos-14 GitHub Actions runner as mentioned at actions/runner-images#9254 (comment).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, reworded at 7451104

1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ repos:
hooks:
- id: check-added-large-files
args: [ '--maxkb=512', '--enforce-all' ]
exclude: conda-lock.yml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
Loading