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

Importing one component of a certain family/module leads to importing all components of the same family/module #8650

Open
1 task
tstadel opened this issue Dec 17, 2024 · 0 comments · May be fixed by #8655
Open
1 task
Assignees
Labels
P2 Medium priority, add to the next sprint if no P1 available

Comments

@tstadel
Copy link
Member

tstadel commented Dec 17, 2024

Describe the bug
Importing one component type (e.g. OpenAIGenerator) leads to importing all types of the same family/module (e.g. haystack.generators). This causes increased pipeline loading times and can cause dependency issues (e.g. cyclic dependencies, dead locks while concurrent loading, etc.) whereas often it is unlikely that multiple types of a module will be used together (e.g. OpenAIGenerator and HuggingFaceLocalGenerator).

Error message

Expected behavior
Importing/using one component type does not load all other types of the same family/module.

Additional context
E.g. this issue together with #8649 leads to importing all routers and converters when using FileTypeRouter.

To Reproduce

FAQ Check

System:

  • OS:
  • GPU/CPU:
  • Haystack version (commit or version number):
  • DocumentStore:
  • Reader:
  • Retriever:
@julian-risch julian-risch added the P2 Medium priority, add to the next sprint if no P1 available label Dec 17, 2024
@julian-risch julian-risch self-assigned this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium priority, add to the next sprint if no P1 available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants