-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat: DIA-1415: Add LabelConfig->ResponseModel generator #327
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nikitabelonogov
force-pushed
the
fb-dia-1415-2
branch
from
October 2, 2024 09:56
28dad55
to
3dc6792
Compare
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Follow Merge downstream workflow has been failed. |
Follow Merge downstream workflow has been failed. |
Follow Merge downstream workflow has been failed. |
1 similar comment
Follow Merge downstream workflow has been failed. |
Follow Merge downstream workflow has been failed. |
Follow Merge downstream workflow has been failed. |
Follow Merge downstream workflow has been failed. |
hakan458
approved these changes
Oct 16, 2024
matt-bernstein
approved these changes
Oct 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
• Added functionality to convert Label Studio interface configurations to JSON schema, enhancing interoperability with other tools and systems
• Implemented a new utility function
json_schema_to_pydantic
that dynamically generates Pydantic models from JSON schemas, enabling runtime type checking and validation• Extended various control tag classes (e.g., ChoicesTag, LabelsTag, NumberTag) with
to_json_schema
methods, providing detailed schema representations for each tag type• Added a
to_json_schema
method to the LabelInterface class, allowing for easy conversion of entire labeling configurations to JSON schema• Introduced new test cases in
test_json_schema.py
to verify the correct conversion of Label Studio configurations to JSON schemas and the proper functioning of the Pydantic model generation• Updated project dependencies to include
datamodel-code-generator
, supporting the new JSON schema to Pydantic model conversion functionality• Implemented thread-safe and concurrent processing tests to ensure the reliability of the new JSON schema to Pydantic conversion in multi-threaded environments