Repository navigation
Ship rfdiffusion/inference/sym_rots.npz in built distributions (fixes #305) - #461
Open
AtharvaTilewale wants to merge 1 commit into
Open
AtharvaTilewale wants to merge 1 commit into
AtharvaTilewale wants to merge 1 commit into
Conversation
find_packages() only collects Python modules, so a non-editable install
(pip install ., the wheel, the sdist, and the Dockerfile's
`pip install /app/RFdiffusion`) left out rfdiffusion/inference/sym_rots.npz.
symmetry.py loads that file from the installed package directory, so every
tetrahedral, octahedral and icosahedral run died with
FileNotFoundError: .../rfdiffusion/inference/sym_rots.npz
Editable installs hide this because they point back at the source tree.
Fixes RosettaCommons#305
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.
Problem
Any symmetry run from a non-editable install (
pip install ., the wheel, the sdist, or the Dockerfile'spip install /app/RFdiffusion) dies inSymGen.__init__:The reporter's workaround was to
cpthe file into site-packages from the Dockerfile.Root cause
setup.pyusesfind_packages()and declares no package data.find_packages()only collects Python modules, sorfdiffusion/inference/sym_rots.npz— the only non-.pyfile in the package — is left out of every built distribution.symmetry.pyloads it from the installed package directory (pathlib.Path(__file__).parent), so tetrahedral, octahedral and icosahedral symmetry all fail. The README'spip install -e .route hides this, because an editable install points back at the source tree.What this changes
One line in
setup.py:No version bump, no new dependency, no change to any module.
Validation
The project's only test harness (
tests/test_diffusion.py) needs the downloaded checkpoints and the CUDAdgl/torchwheels, neither of which is reachable from this machine, so it was not run; this change touches packaging metadata only. Instead, the distributions were built and installed:Before the change (at
86507b6) the wheel holds only the four modules:After the change:
Driving the real class from the installed (non-editable) package reproduces the issue's frame and then clears it:
pip install -e . --no-depswas re-checked afterwards and still resolvesSymGen('tetrahedral')(order = 12) from the source tree, so the documented install route is unchanged.Fixes #305
Disclosure: this change was prepared with AI assistance and validated locally as described above.