dspy
dspy copied to clipboard
AttributeError: 'dict' object has no attribute 'augmented' error on multihop_finetune.ipynb notebook
Hi @okhat ,
Thanks for the nice framework! I am trying to get familiar with the framework by running some easy-to-run notebooks. I tried the https://github.com/stanfordnlp/dspy/blob/main/examples/qa/hotpot/multihop_finetune.ipynb notebook on Google colab and faced the following error without any change in the code:
AttributeError: 'dict' object has no attribute 'augmented'
Here is my notebook link: https://colab.research.google.com/drive/1Nr3UZTBF-MDchvhfVT3OC2VHPaJUWlrg?usp=sharing
Thanks for your help in advance!
I believe (but not 100% sure) this got fixed in the latest main
but not merged to pypi yet. We'll merge to pypi now so please let me know if that fixes things @arian-askari
Pushed to pypi. Let me know!
Hey Omar! Thanks for your efforts and response. I get below error now:
ConnectionError: HTTPConnectionPool(host='future-hgx-1', port=7141): Max retries exceeded with url: /generate (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7ba3f3b8dff0>: Failed to resolve 'future-hgx-1' ([Errno -2] Name or service not known)"))
Notebook link: https://colab.research.google.com/drive/1Nr3UZTBF-MDchvhfVT3OC2VHPaJUWlrg?usp=sharing
'future-hgx-1'
This was an example code to talk to a specific server 'future-hgx-1'
, so you need to update this to your server (cgi) if exists or use other LM, such as openai apis.
I got the same issue!
IIRC, the notebook here is cached so you if you run without any changes I believe the notebook should run.
If you want to make changes, you need to set up your own TGI server, which is covered by other documentation on our site in depth
Hey @okhat, But I run without any changes and it does not work. I've shared the notebook above which shows I didn't do any changes.
I mean this: https://colab.research.google.com/drive/1Nr3UZTBF-MDchvhfVT3OC2VHPaJUWlrg?usp=sharing
It's possible that cell isn't cached, in any case it outputs:
Average Metric: 424 / 1000 (42.4%)
42.4
The other parts (before/after) don't depend on that cell. They're all pre-saved and loaded so that's probably taking place of caching in this notebook.
for idx in range(4):
prog = BasicMH()
prog.load(f'multihop_llama213b_{idx}.json')
ensemble.append(prog)
I think this notebook is supposed to use open-source LLMs if I understood correctly? How we could just disable cache and let it to use the open source LLM so we could get it to work?
Technically, it should be possible to call a locally loaded model, e.g., LLaMA, without having a server/service. If this needs some change in the code maybe I can make a PR if you guide me which part of the code needs modification. (Another solution: the code can first run the local model as a service so everyone can work with DSPY easily without the need of deploying the LLM as a server/service...)