chore(deps): drop hf-classifier extra#2137
Merged
Merged
Conversation
Remove the hf-classifier packaging extra (transformers, torch) and drop those packages from the aggregate all extra. transformers/torch are heavy dependencies we do not want to declare as an installable extra. The hf_classifier rail is unchanged: its local backend already imports transformers lazily, so users install the packages directly (pip install transformers torch), matching the jailbreak-detection rail. The ImportError hint in backends.py is updated to point at the direct install instead of the removed extra. Regenerate uv.lock accordingly.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughRemoved the Changeshf-classifier dependency removal
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Description
Drop the
hf-classifierpackaging extra.transformersandtorchare heavydependencies that we do not want to declare as an installable extra; this
removes the
hf-classifierextra and those two packages from the aggregateallextra.Coupled with docs PR #1969 (
hf_classifierrail docs): its Setup sectioncurrently shows
pip install nemoguardrails[hf-classifier], which becomesinvalid once this lands. Whichever PR merges last must reconcile so the docs
show only
pip install transformers torch.AI Assistance
Checklist
hf_classifierrail #1969; see coupling note above.)test_hf_classifier.pystill passes.)Summary by CodeRabbit