-
Notifications
You must be signed in to change notification settings - Fork 439
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
Use valid JSON booleans in DAG template #1349
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @Spectavi thanks for the PR! I was wondering will this affect the unpacking of true and false into the |
Yes, the json.loads() method parses into the Python bool as expected. I saw no ill-effects from this change and it fully resolved the occasional false-positive. |
To clarify in more detail, if a model obeys that template as-is they will be sending back invalid JSON that causes json.loads() in trimAndLoadJson to fail. Most models are smart enough to “correct” the template and send back valid JSON, but once in a while for whatever reason, it will follow the template exactly and send back invalid JSON. I verified this by printing out jsonStr right before json.loads() is called. |
@Spectavi got it, appreciate it! |
Also @Spectavi since dag is pretty new thing we added, would love to get some feedback! |
Sure, yeah I saw it just went in so kind of expected a few bumps. Now that I have the kinks smoothed out it does seem to be more controllable than GEval, which is really nice! I did hit a few bumps and head-scratchers, here’s the notes:
|
@Spectavi right just saw the bug too on importing DAG, thanks! Yes it makes sense for binary node to be able to be a root node, next release! For the verdict score we just didn't want users to have to type floats instead of ints. I'd imagine its more error prone if they had to do 0.1 instead of 1 (like what if they do 01, 0.01, etc). Will include it in the docs! |
This capitalized True was confusing my model, causing it to sometimes send invalid JSON.
Changing this fixed the problem.