Closed lfunderburk closed 6 months ago
Hello @lfunderburk Thank you for reporting this. I have some trouble to reproduce the issue. Using the code you have under "To Reproduce", I just added "ranker": {"query": question},
to the pipeline.run(...)
call and I get the expected answer Capybara
. Could you please check again whether you can reproduce the error?
Here is a colab for running the code: https://colab.research.google.com/drive/1fjsevrTRYd5FFcScD8ryjQVyTCgdRhyr?usp=sharing
Hello.
I have a similar issue, some details as a context.
This is the code:
hf_token = "XXXXXXXXXXXXXXXXXXXX" from haystack.components.generators import HuggingFaceTGIGenerator
generator = HuggingFaceTGIGenerator("mistralai/Mistral-7B-v0.1", token=hf_token) generator.warm_up() result = generator.run("What is Natural Language Processing?", generation_kwargs={"max_new_tokens": 350}) print(result["replies"][0])
This is the output:
(mixtral) PS C:\Users\52331\Desktop\Main\Python\LanguageModels\Mixtral_Haystack_HF-TGI> & c:/Users/52331/Desktop/Main/Python/LanguageModels/Mixtral_Haystack_HF-TGI/mixtral/Scripts/python.exe c:/Users/52331/Desktop/Main/Python/LanguageModels/Mixtral_Haystack_HF-TGI/mix01.py
Traceback (most recent call last):
File "c:\Users\52331\Desktop\Main\Python\LanguageModels\Mixtral_Haystack_HF-TGI\mix01.py", line 15, in
@Joricz thank you for this report. I can't reproduce this issue on Python versions (3.8-3.11) on OSX. Please put a debugger breakpoint just before this line to inspect the value of tgr.details.finish_reason
and let us know what you get there. You should get the FinishReason enum. Also, which huggingface_hub version do you have installed in your environment?
Hello. I've attached pictures On line 12 "generator = HuggingFaceTGIGenerator("mistralai/Mistral-7B-v0.1", token=hf_token)", I got: "tgr.details.finish_reason: not available" On line 13, "generator.warm_up()", I got: "tgr.details.finish_reason:NameError: name 'tgr' is not defined"
hf_hub version is: 0.19.4
Best regards and happy new year :)
haystack-ai 2.0.0b4 Fixed this!
@julian-risch could you please verify that the fix works and close this if it does?
Hello.
In my case I've upgraded to 2.0.0b4 and the issue has been fixed. Now I can go on with the rest of the tutorials, thank you!
Jorge.
Can't reproduce with 2.0.0b4 and I suspect that initially an old transformers version caused the issue. Feel free to re-open if the issue remains with up to date Haystack and transformers versions.
Advent of Haystack Day 2
Describe the bug Building RAG with ranker and with HFTGI Generator component throws data structure error message, whereas if I use GPT Generator, the pipeline works fine.
Error message
Expected behavior I should be able to use another generator and obtain the same functionality.
Additional context
Advent of Haystack Day 2
To Reproduce
FAQ Check
System: