dspy
dspy copied to clipboard
'NoneType' object is not iterable, "Local Models & Custom Datasets" notebook
Hi,
Thanks for the nice framework!
I tried to use it for the first time and get familiar with it in practice. I used the Local Models & Custom Datasets notebook provided in the Tutorials section, but I got an error with running all cells (without any modification).
Here is my notebook so you can see the error: https://colab.research.google.com/drive/1QdqAJIT3gR0KdsRk373GWoZFk1XossD8?usp=sharing
Apparently, the error is related to a TODO in the code:
# TODO: Replace `None` with a call to self.retrieve to retrieve passages. Append them to the list `passages`.
Bests, Arian
Hey Arian, that's not a bug, it's a tutorial request! You can see the *_completed.ipynb notebook if you want a cheatsheet haha!
This is for learners. Do you think we should have a PR that says that more explicitly? Can't remember if we say that somewhere. It can also link to the completed vrersion.
Hey Omar! Thanks a lot for your response and for referring to the cheat sheet. I think having that definitely helps, especially since this was the second time I used DSPY (particularly this script) and I just stopped because of an error. I assume this might happen to others as well if they are not patient enough, haha.
I just did the PR and made more explicit as you suggested: https://github.com/stanfordnlp/dspy/pull/536
I tested completed version here and it works perfectly fine! Thanks! https://colab.research.google.com/drive/16akU5J4VzbjFJy3fz9me9H1HAQx3sCGe?usp=sharing