Skip to content
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

octo generator loads slow #716

Open
leondz opened this issue Jun 3, 2024 · 0 comments
Open

octo generator loads slow #716

leondz opened this issue Jun 3, 2024 · 0 comments
Labels
generators Interfaces with LLMs quality-speed This affects the speed of program use

Comments

@leondz
Copy link
Owner

leondz commented Jun 3, 2024

The majority of the loading time seems to be import of octoai in garak.generators.octo.

To experience it, try python -m garak --list_generators, which should return very fast - but has to import generators.

The delay is attributable to import octoai.errors being in the global scope of the octo module.

This import is in the global scope to enable the backoff exception to be loaded:

@backoff.on_exception(backoff.fibo, octoai.errors.OctoAIServerError, max_value=70)

Lazy loading of octo in the constructor is preferable.

@leondz leondz added generators Interfaces with LLMs quality-speed This affects the speed of program use labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generators Interfaces with LLMs quality-speed This affects the speed of program use
Projects
None yet
Development

No branches or pull requests

1 participant