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

Make tool JSON schemas consistent #31756

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Make tool JSON schemas consistent #31756

merged 1 commit into from
Jul 2, 2024

Conversation

Rocketknight1
Copy link
Member

@Rocketknight1 Rocketknight1 commented Jul 2, 2024

Our helper for generating JSON schemas from functions had an inconsistency, because the order of types inside a Union is not well-defined (I suspect internally it gets converted to a set somewhere).

As a result, they came out in somewhat arbitrary order, and this caused the CI to break when we changed some random aspect of the test runner that flipped the order to the other one. This PR fixes that by using sorted() to ensure a consistent ordering for a union of types.

@Rocketknight1 Rocketknight1 requested a review from amyeroberts July 2, 2024 18:02
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@gante
Copy link
Member

gante commented Jul 2, 2024

Merging exceptionally under the following rationale: [cc @amyeroberts @LysandreJik ]

  1. Our core maintainers are both off
  2. The PR LGTM
  3. It fixes breaking CI, so it unblocks other work
  4. It's very small

🤗

@gante gante merged commit cd0935d into main Jul 2, 2024
22 checks passed
@gante gante deleted the fix_template_utils_test branch July 2, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants