-
Notifications
You must be signed in to change notification settings - Fork 679
feature: deferred loading and requirement pruning #1199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
leondz
wants to merge
72
commits into
NVIDIA:main
Choose a base branch
from
leondz:update/optional_imports
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
3000d4c
draft postponed import pattern for cohere generator
leondz 757e0f3
move extra dependency requirements into classdefs, mediate requiremen…
leondz 9310d0a
actually do the plugin dep load
leondz dac569e
migrate generators to 'extra dependencies' pattern
leondz 35e93fc
prune dupe lazyload
leondz bf7f36b
extra_dependency_names in all plugins
leondz 6a39b0c
active must be False for Probes using extra modules
leondz 56c6182
make PIL optional in generators.huggingface.LLaVA
leondz 3657e04
move optional load fail to ModuleNotFoundError
leondz 865d604
add _load/_clear_deps() into base generator and _load/_clear client
leondz d61957d
put the MNFE where it belongs
leondz 8a7051e
backoff exception placeholder must inherit base exception
leondz 60775f6
test for reqs presence in pyproject.toml, requirements.txt
leondz 31e98d4
handle hyphen in pypi pkg names
leondz 75babb7
rm optional plugin deps
leondz 83f551a
skip generator tests if optional deps absent
leondz dd51196
support sub-package deps
leondz b33a46c
scope optimum to nvidia
leondz de5b3f1
move import function to _load_deps
leondz 19c31fe
rm import handling in langchain
leondz 54fabc5
amend optimum to be nvidia flavour
leondz ffac714
dry - use garak._plugins.PLUGIN_TYPES as canonical def of 1st class p…
leondz 97c8160
unify backoff exception pattern mediated via garak GeneratorBackoffEx…
leondz 1d4e69c
skip instantiation when modules not present
leondz 6164bc5
catch straggling backoff exception wrappings
leondz 85fb7c3
Merge branch 'main' into update/optional_imports
leondz 0402116
use isinstance for exception matching
leondz e287fe9
don't backoff on 404
leondz 6339648
merge in our good pal main
leondz 76b1774
switch to pyproject; get tests deps if testing
leondz ca133e4
add [dev] target
leondz 8e8a5b9
add required jsonschema that was previously implicit from now-optiona…
leondz aa7500a
specify versions; move to secure versions cf. #1207
leondz 4f2e5ef
skip internal config mappings for req consistency testing
leondz 69cfef2
skip test option for non-test workflow
leondz a1da5ed
skip ollama tests if no module
leondz 3a8605d
rm spurious dep check
leondz d2d17ad
straggling spurious check
leondz 13974b8
Merge branch 'main' into update/optional_imports
leondz dc83929
Merge branch 'main' into update/optional_imports
leondz d527650
merge in octo removal
leondz 8c46730
add all_plugins option; handle pkg name != import nonsense in pillow
leondz 06180b6
rm unused import
leondz 7c22dea
cache maint workflow gets deps for all plugins
leondz ce23d70
merge main
leondz 8ab94bd
Merge branch 'main' into update/optional_imports
leondz bb67a3e
Merge branch 'main' into update/optional_imports
leondz b45ba35
use correct backoff exception name
leondz de86505
merg main / turn & conv
leondz 38e6a15
cohere v2 validation: update backoff errors, remove double unpacking …
leondz 64399a5
merge main
leondz 65ac9fe
rm unconditional top level ollama import in test
leondz ea71cea
wrap llava test global imports in try/except
leondz 14b958d
Update tests/test_reqs.py to use global plugins def
leondz d0c90ea
move plugin-general tests to tests/plugins
leondz de28c75
force cache update to include new plugin param
leondz 1742f60
gate dep-requiring tests
leondz c877225
migrate to deferred loading
leondz 6eede53
cohere generator partial fixes
leondz 2bcca2c
revent to main for cohere
leondz 9d57b5c
add deferred loading to cohere; migrate to new library exception names
leondz e195148
skip cohere tests if module not present
leondz f8e8635
skip tomllib-using tests if lib not present
leondz 246b7dc
rm audio,dra hard deps
leondz b9e3b73
bring pyproject up to standard, add tests
leondz 40b6bcc
summon librosa in probes.audio
leondz ae5ad5d
deselect audio achilles heel by default
leondz 1a57c8e
force update cache sorry
leondz 738e8e8
skip tests that fail on import (maybe a custom exception is better)
leondz 46e1794
skip tests where deps not present
leondz dfbe9ac
scan and report all missing modules in _plugins.load_plugin
leondz 35fa3d6
generalise dep loading & clearing to _plugins; activate in probes also
leondz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in
Configurableinstead, since it can/should be used across all base classes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely makes sense to factor it up, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the generator implementation is special, because generators have client load/unload for probe parallelisation. will slate upfactoring for a second iteration.