Skip to content
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

Prevent Infinite Repetition in JSON Schemas with number #1157

Open
lapp0 opened this issue Sep 17, 2024 · 0 comments
Open

Prevent Infinite Repetition in JSON Schemas with number #1157

lapp0 opened this issue Sep 17, 2024 · 0 comments

Comments

@lapp0
Copy link
Contributor

lapp0 commented Sep 17, 2024

What behavior of the library made you think about the improvement?

In JSON Schema safe_subset mode

However you can still produce infinite numbers in safe_subset mode.

How would you like it to behave?

Finish the safe_subset implementation in JSON Schema through

json_schema.py already has the following attributes which can be provided a safe_subset-mode default:

           bounds = {
                "minDigitsInteger",
                "maxDigitsInteger",
                "minDigitsFraction",
                "maxDigitsFraction",
                "minDigitsExponent",
                "maxDigitsExponent",
            }

Questions

  • Should we include details about reporting to the Outlines team or an explanation in the error dict? Or perhaps use a warning?
@lapp0 lapp0 changed the title Prevent Infinity Repetition in JSON Schemas with number Prevent Infinite Repetition in JSON Schemas with number Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant