Skip to content

Fix LigandMPNN weights downloading#22

Merged
delalamo merged 4 commits intodelalamo:mainfrom
brineylab:main
Jan 21, 2026
Merged

Fix LigandMPNN weights downloading#22
delalamo merged 4 commits intodelalamo:mainfrom
brineylab:main

Conversation

@briney
Copy link
Copy Markdown
Contributor

@briney briney commented Jan 20, 2026

The original code stored model weights inside the package installation directory (site-packages), which is read-only in production environments like Docker containers and conda installs.

This update switches the default weights directory to ~/.graphrelax/weights, which can be overridden by setting the GRAPHRELAX_WEIGHTS_DIR env var. New tests were added to cover the weights downloading.

The original code stored model weights inside the package installation
directory (site-packages), which is read-only in production environments
like Docker containers and conda installs.

Changes:
- Store weights in ~/.graphrelax/weights/ (user-writable location)
- Add GRAPHRELAX_WEIGHTS_DIR env var for custom locations
- Support fallback to legacy package directory for backwards compatibility
- Improve error handling with clear permission error messages
- Always log download progress for user feedback
- Add comprehensive test suite for weight downloading (20 tests)
- Update Dockerfile to use /app/weights for container environments
- Centralize weights_exist() usage across integration tests
- Add extend-exclude for LigandMPNN directory in black config
- Add skip_glob for LigandMPNN directory in isort config
- Fix black formatting in test_weights.py
- Remove unused MagicMock import
Fix weight downloading to use user-writable directory
@delalamo
Copy link
Copy Markdown
Owner

Thanks for the edits! Hope you find the repo helpful

@delalamo delalamo merged commit db9b10e into delalamo:main Jan 21, 2026
3 checks 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.

2 participants