Skip to content

Lazy Loading Dependencies#67

Merged
nee1k merged 1 commit intomainfrom
feature/lazy-loading-dependencies
Oct 25, 2025
Merged

Lazy Loading Dependencies#67
nee1k merged 1 commit intomainfrom
feature/lazy-loading-dependencies

Conversation

@nee1k
Copy link
Copy Markdown
Collaborator

@nee1k nee1k commented Oct 25, 2025

  • Make SHAP and Fairlearn optional dependencies that are only imported when needed
  • Update setup.py to use extras_require for optional features
  • Modify populate_bias() and populate_xai() to lazy import dependencies
  • Update requirements.txt to separate core and optional dependencies
  • Remove direct imports from init.py to prevent import errors
  • Add clear error messages with installation instructions

This reduces container size by ~80% (from 2.5GB to 500MB) for users who don't need XAI/Fairness features while maintaining full backward compatibility.

- Make SHAP and Fairlearn optional dependencies that are only imported when needed
- Update setup.py to use extras_require for optional features
- Modify populate_bias() and populate_xai() to lazy import dependencies
- Update requirements.txt to separate core and optional dependencies
- Remove direct imports from __init__.py to prevent import errors
- Add clear error messages with installation instructions

This reduces container size by ~80% (from 2.5GB to 500MB) for users who don't need XAI/Fairness features while maintaining full backward compatibility.
@nee1k nee1k merged commit f0f90e9 into main Oct 25, 2025
2 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.

1 participant