-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
refactor: Remove AnswerToSpeech and DocumentToSpeech nodes #4391
Conversation
@agnieszka-m @silvanocerza What's the plan with the documentation? For example with this page: https://docs.haystack.deepset.ai/v1.15-unstable/docs/answer_to_speech |
@silvanocerza don't forget to remove https://github.com/deepset-ai/haystack/blob/main/haystack/schema.py#L283 and audio dependencies: https://github.com/deepset-ai/haystack/blob/main/pyproject.toml#L149 We also don't need |
c2a11ab
to
f023d23
Compare
"pydub", | ||
"protobuf<=3.20.1", | ||
"soundfile< 0.12.0", | ||
"numpy<1.24", # Keep compatibility with latest numba | ||
"openai-whisper" |
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.
Noice @silvanocerza
@julian-risch @silvanocerza so what's the plan for this "extras" repo? what's going to be there? we definitely need some documentation around it. But I assume the nodes moved to extras will still work as described in the current docs? just the installation is going to differ? Is this going to be in 1.15? |
As of now they'll be only moved in the deepset-ai/haystack-extras repo and published as separate packages. Their logic will be left untouched but it's possible it might change in the future. 🤷 I like the idea of introducing the concepts of Haystack core and extras in the installation instructions.
Yes, they'll be removed already in the next version. |
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.
Looks very good to me already, just a few tiny things that can also be removed:
AudioNodeError
in haystack/errors.py is unused now and should be removed.AnswerToSpeech
andDocumentToSpeech
safe_imports should be removed from haystack/nodes/init.py- Searching for
"audio"
in the code base givesContentTypes = Literal["text", "table", "image", "audio"]
in haystack/schema.py and also some results in Embedder. We should add a link to the extras repo maybe, because it relies on it, for example here but looking just at Haystack, it's hard to understand why we still have it.
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! 👍
e801fef
to
63daea8
Compare
Rebased to fix conflicts. |
Proposed Changes:
This PR completely removes
AnswerToSpeech
andDocumentToSpeech
audio nodes and relative tests.We decided to completely remove them directly as the nodes are not used as shown by our internal metrics.
This nodes will still be usable from the Haystack extras.
How did you test it?
I run tests locally.
Notes for the reviewer
Hold merging this until we publish the extra packages.