Repository navigation
Drop the enable_mps step from the Metal installation instructions - #31
Merged
Merged
Conversation
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>
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
abTEM/abTEM#414 no longer needs
enable_mps: PyTorch is now imported the first time thempsdevice 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_MPSenvironment variable, theenable_mps: trueconfig line, and the note explaining whyabtem.config.setcouldn't switch it on.Added:
abtem.config.set({"device": "mps"})ordevice: mpsin~/.config/abtem/abtem.yaml.pyfftwyourself. Ifpyfftwcomes first, usingmpsraises an error explaining why, rather than crashing.I ran every snippet in the updated section against the #414 branch, including
device: mpsfrom a config file and thepyfftw-first error.Merge together with abTEM/abTEM#414. This describes that PR's behaviour. abTEM's
devbranch 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