-
Notifications
You must be signed in to change notification settings - Fork 372
Support Apple Silicon #81
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for running AI Scientist-v2 on macOS with Apple Silicon by integrating Metal Performance Shaders (MPS) backend support throughout the codebase.
Key changes:
- Added MPS device detection and selection logic alongside existing CUDA support
- Updated GPU count detection to recognize MPS as a single-device backend
- Created comprehensive macOS setup documentation with installation instructions
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| launch_scientist_bfts.py | Added MPS device detection to GPU enumeration logic |
| ai_scientist/treesearch/parallel_agent.py | Updated device selection guidelines, GPU counting, and random seed initialization to support MPS |
| ai_scientist/ideas/i_cant_believe_its_not_better.py | Modified device selection and torch.compile conditional to include MPS |
| ai_scientist/ideas/i_cant_believe_its_not_betterrealworld.py | Modified device selection and torch.compile conditional to include MPS |
| README.md | Added reference to macOS setup documentation |
| MACOS_SETUP.md | New documentation file with detailed Apple Silicon installation and setup instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Problem
The project didn’t support running on macOS Apple Silicon (MPS).
Approach
MACOS_SETUP.md) and linked it from theREADME.md.i_cant_believe_its_not_better*examples to selectcuda→mps→cpu, and guardedtorch.compile/ MPS checks for compatibility.Limitations
cuda.