Skip to content

Drop the enable_mps step from the Metal installation instructions - #31

Merged
TomaSusi merged 1 commit into
mainfrom
metal-without-enable-flag
Oct 1, 2026
Merged

TomaSusi merged 1 commit into
mainfrom
metal-without-enable-flag

Conversation

@TomaSusi

@TomaSusi TomaSusi commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

abTEM/abTEM#414 no longer needs enable_mps: PyTorch is now imported the first time the mps device is used, rather than behind a flag that had to be set before abTEM was imported. This updates the Metal section of the installation page to match.

Removed: the ABTEM_ENABLE_MPS environment variable, the enable_mps: true config line, and the note explaining why abtem.config.set couldn't switch it on.

Added:

  • How to make Metal the default device, with abtem.config.set({"device": "mps"}) or device: mps in ~/.config/abtem/abtem.yaml.
  • The one ordering caveat left: import abTEM (or PyTorch) before importing pyfftw yourself. If pyfftw comes first, using mps raises an error explaining why, rather than crashing.

I ran every snippet in the updated section against the #414 branch, including device: mps from a config file and the pyfftw-first error.

Merge together with abTEM/abTEM#414. This describes that PR's behaviour. abTEM's dev branch doesn't have Metal support yet, so the Metal section won't match released code until #414 merges either way. Merging the two together keeps the page in step.

🤖 Generated with Claude Code

abTEM/abTEM#414 now imports PyTorch on the first use of the 'mps' device
instead of behind an 'enable_mps' flag set before abTEM is imported, so
the flag, its environment variable and the note explaining why
abtem.config.set could not turn it on all go. In their place: making
'mps' the default device, and the one ordering caveat left -- abTEM (or
torch) has to be imported before pyfftw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TomaSusi
TomaSusi merged commit 2da19f6 into main Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant