-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Impossible to use any of the GIT models from Microsoft #4301
Comments
Hello @danielbichuetti!
So the main question is: how to implement a check before loading the model? |
Oh. We use it on a custom node here. GIT and BLIP2 for Visual Question Answering But we are using it:
BLIP2 has some differences: I usually don't make usage of the pipelines. Interesting. |
I'd prefer to use a pipeline for this task, to be agnostic about the underlying stuff (models, architectures, processors), I see that somewhere in Haystack `AutoConfig` is used to get information on a model (without loading it)haystack/haystack/modeling/model/language_model.py Lines 936 to 946 in 2a1d73e
Unfortunately, in this case Currently, the pipeline only supports If we still want to use the pipeline (I'm in favor),
WDYT? |
Using the pipeline provides a much cleaner code. I noticed this because we are merging our company codebase with Haystack. It mainly consists of removing redundant nodes, functions, patching Haystack Document to our small modification (we like the ability to use IDs that can be calculated based on specific meta fields, not all). Currently the only remaining nodes are:
We are checking the model name start (git-* and blip2-, if not, we check for ViT in the middle of the model). Subsequently, we are trying to load the model. As our environment is constrained, it was a good workaround. Maybe we could implement a temporary workaround to check if the model starts with git- and blip2 (blip has some diff. When building the inputs). If not, check if on the pipeline allowed list? Furthermore, I noticed that transformers is pinned at 4.25. Which might represent an issue. |
Hey @anakin87!
This has been a notoriously hard task to accomplish unfortunately. We mostly used ad-hoc solutions depending on model type, sometimes all the way down to checking the model names for cues 🙈 If |
Describe the bug
When attempting to use the image to text node from Haystack, we are getting an error saying KeyError : git.
Error message
KeyError: git
Expected behavior
Use the GIT models from Microsoft
Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.
To Reproduce
FAQ Check
System:
The text was updated successfully, but these errors were encountered: