-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Template issues when fields are missing from demos #650
Comments
The first and last fields are required in the current design, not a bug but can be "behavior to improve" in some way |
If it's required, and it doesn't throw an error, then it's just another kind of bug :-) Can you think of anything that would break if I fixed this to return something like this?
? |
@thomasahle Yeah I wouldn’t make that change. Just pass N/A to the fields you don’t need or something to that effect. This shouldn’t throw an error, it’s almost guaranteed that there will be missing fields in some examples with respect to some modules. The behavior is to not show them in that case. But what we might need is a per-module way to assign explicit labeled data. There, more checks can be enforced. |
@okhat What I'm suggesting in #650 (comment) is exactly to not show the fields if they are not set. The current behaviour is this:
That is, the separator |
Consider this DSPy program:
You would think the
inspect_history(n=1)
to look like:Or in some other reasonable way handle the lack of "thoughts" in the labeled data.
However, what we get instead is
Which has a big problem: The
---
line is missing.Whatever solution we have to "fields missing from examples", this shouldn't be it.
Things get even worse if the last field is missing, rather than a field in the middle.
Consider this DSPy program:
Where I moved "thoughts" to be after "output".
Now I get this trace:
We see that the example has completely disappeared.
This confused me for quite a while.
The text was updated successfully, but these errors were encountered: