-
Notifications
You must be signed in to change notification settings - Fork 677
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
…of Conversation, handle Nones in response
Co-authored-by: Jeffrey Martin <[email protected]> Signed-off-by: Leon Derczynski <[email protected]>
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.
LGTM except docs update.
| @pytest.mark.skipif( | ||
| not all( | ||
| [ | ||
| importlib.util.find_spec(m) | ||
| for m in OllamaGeneratorChat.extra_dependency_names | ||
| ] | ||
| ), | ||
| reason="missing optional dependency", | ||
| ) |
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.
I'll point you to this example, which I believe is approximately what @jmartin-tech is thinking.
https://github.com/NVIDIA-NeMo/Guardrails/blob/fa113814ffb05ec267f63ae5b862382ac16dcd4c/tests/test_utils.py#L150
Support construction-time loading of optional modules. Includes
pyproject.tomloptions and pruned fromrequirements.txt_load_depsand_clear_depspattern, used in generator constructor and_load_client/_clear_clientTodo / in scope:
garak._plugins? How - assign func member? create mixin?)generators.coheregenerators.langchaingenerators.litellmgenerators.mistralgenerators.nemoguardrailsgenerators.nemollmgenerators.ollamagenerators.optimum(huggingface.OptimumPipeline) - exception fires, pkg install seems borkedgenerators.replicateprobes.audioNot done:
generatorsOut of scope:
pyproject.tomlResolves #101