Make tensorflow an optional dependency (vus[models] extra)#7
Open
martinuray wants to merge 2 commits into
Open
Make tensorflow an optional dependency (vus[models] extra)#7martinuray wants to merge 2 commits into
martinuray wants to merge 2 commits into
Conversation
added 2 commits
July 2, 2026 20:35
…nd updated models with ImportError handling.
… and usage of extras_require
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.
This PR is addressing issue #6 .
TensorFlow was a mandatory dependency for the whole package, even though it's only needed by three of the baseline detectors under
vus.models:lstm.py,AE.py, andcnn.py. The metrics themselves, which are the actual contribution of the paper, have no TensorFlow or GPU dependency at all.This meant every
pip install vuspulled in TensorFlow, which is a common source of dependency conflicts (TensorFlow/PyTorch/CUDA version mismatches) in projects that don't otherwise use it, even when the only thing needed fromvusis the evaluation metrics.This PR moves
tensorflowout ofinstall_requiresand into an optionalmodelsextra.pip install vusnow installs a lightweight package with just the metrics, andpip install vus[models]additionally installs TensorFlow for the three baseline detectors that need it.This is technically a breaking change for anyone relying on a plain
pip install vusto also pull in TensorFlow implicitly, but should be a net improvement for most users, who only need the metrics and now get a lighter install with one less source of dependency conflicts.