Skip to content

Json schema creation - #29

Merged
ayushi1208 merged 18 commits into
mainfrom
dev
Nov 6, 2025
Merged

ayushi1208 merged 18 commits into
mainfrom
dev

Conversation

@ayushi1208

Copy link
Copy Markdown
Contributor

Issue #, if available:
#18

Description of changes:
Json schema spec -> StructuredModel support

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sromoam and others added 15 commits October 22, 2025 09:29
Moved comparison logic out to helper classes.
Validated test are passing.
* Delegating to classes, helper functions.
Pushing further reduction to structured model.
- Create new `__init__.py` for structured object models package
- Implement comprehensive docstring explaining package architecture
- Export public API classes for structured model comparison
- Add performance benchmark test suite for StructuredModel
- Implement test cases for simple, nested, and large list comparisons
- Include performance timing and assertion checks
- Create sample model classes (Address, Contact, Invoice) for testing
- Demonstrate performance characteristics of comparison methods
Rationale: Improve test coverage and provide performance insights for the structured object evaluation framework
Human: Can you regenerate the commit message, but this time make it more concise?
…mentation

- Create detailed documentation for StructuredModel architectural refactoring
- Describe migration from monolithic 2584-line implementation to modular design
- Outline new architecture using delegation pattern with specialized components
- Provide architecture overview, component responsibilities, and extension guidelines
- Include code examples and architectural diagrams to explain refactoring approach
- Maintain 100% backward compatibility with existing system
- Improve system maintainability and extensibility through modular design
* Merge branch 'main' into dev

* Added .DS_Store to .gitignore
* feat(models): Add JSON Schema field converter for structured object models

- Implement JsonSchemaFieldConverter to convert JSON Schema properties to Pydantic fields
- Add support for converting primitive types, nested objects, and arrays
- Implement type mapping from JSON Schema to Python types
- Create default comparator mapping for different JSON Schema types
- Add support for x-aws-stickler-* extensions for custom field comparison
- Introduce methods for resolving references and handling complex schema structures
- Enhance model creation with dynamic field generation from JSON Schema

* Adding teests, for complex objects from the ocr-benchmark.

* Alright, more schema method improvements.

* Adding the update to the toml file.

* Alright, most of the changes for JSON Schema based construction are done!

* Updating the documentation to demo how things work.

* Updating docs, updating readme

* Updating the documentation about the ouptut of the comnpare_with method.

* Reduced docstring for from_json_schema

* Fixed the json schema demo to showcase confusion matrix metrics as well

---------

Co-authored-by: ayushi1208 <ash264@cornell.edu>
@ayushi1208
ayushi1208 requested a review from sromoam November 6, 2025 20:18

@sromoam sromoam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

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.

2 participants