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

[WIP]: Adding Apple Silicon back to CI #863

Closed
wants to merge 7 commits into from
Closed
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
fail-fast: false
matrix:
# test on all platforms with both supported versions of Python
os: [ubuntu-latest, macos-13, windows-latest]
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
python-version: [3.11, 3.12]
steps:
- uses: actions/checkout@v4
Expand All @@ -84,6 +84,7 @@ jobs:
shell: bash -l {0}
run: |
python -m pip install nbmake
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install ".[dev,docs,test]"
- name: Install hyperopt optional dependencies (Python 3.11 only)
if: ${{ matrix.python-version == '3.11' }}
Expand Down
6 changes: 6 additions & 0 deletions chemprop/cli/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import logging
from pathlib import Path

import torch

from chemprop.cli.utils import LookupAction
from chemprop.cli.utils.args import uppercase
from chemprop.featurizers import AtomFeatureMode, MoleculeFeaturizerRegistry, RxnMode
Expand Down Expand Up @@ -148,6 +150,10 @@ def add_common_args(parser: ArgumentParser) -> ArgumentParser:


def process_common_args(args: Namespace) -> Namespace:
if not torch.backends.mps.is_available() and (getattr(args, "accelerator") in {"mps", "auto"}):
print("AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH")
setattr(args, "accelerator", "cpu")

# TODO: add in v2.1 to deprecate features-generators and then remove in v2.2
# if args.features_generators is not None:
# raise ArgumentError(
Expand Down
Loading