-
Notifications
You must be signed in to change notification settings - Fork 449
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
base: main
Are you sure you want to change the base?
Conversation
…t checks via plugin cache
] | ||
plugin_replicate = [ | ||
"replicate>=0.8.3", | ||
] |
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.
Consider adding to allows for pip install garak[plugin_all]
:
plugin_all = garak[
plugin_cohere,
plugin_langchain,
plugin_llava,
plugin_litellm,
plugin_mistralai,
plugin_nemoguardrails,
plugin_nemollm,
plugin_octoai,
plugin_ollama,
plugin_replicate,
]
There might be a better name to use for this group.
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 we keep requirements.txt
as a consolidated lists of all possible requirements and require usage of pyproject.toml
to get a limited dependencies install?
Another option to me would be simply remove requirements.txt
and require all installs be based on using pyproject.toml
until we implement a lock file.
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.
Right. After migrating the gh workflows to use pyproject.toml, requirements.txt becomes superfluous - I'm leaning toward the latter.
Removal does mean we lose a cross check in test_reqs, but that's OK. Could do with a test to ensure all packages (including optional) specity a version.
Support construction-time loading of optional modules. Includes
pyproject.toml
options and pruned fromrequirements.txt
_load_deps
and_clear_deps
pattern, used in generator constructor and_load_client
/_clear_client
Todo / in scope:
garak._plugins
? How - assign func member? create mixin?)cohere
langchain
litellm
mistral
nemoguardrails
nemollm
octo
ollama
optimum
(huggingface.OptimumPipeline) - exception fires, pkg install seems borkedreplicate
Not done:
generators
Out of scope:
pyproject.toml
Resolves #101