-
Notifications
You must be signed in to change notification settings - Fork 43
Updates #38
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
Updates #38
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,12 +5,12 @@ build-backend = "setuptools.build_meta" | |||||||||
| [project] | ||||||||||
| dynamic = ["version"] | ||||||||||
| name = "keras2c" | ||||||||||
| requires-python = ">=3.7" | ||||||||||
| requires-python = ">=3.7, <=3.12" | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Travis CI tests Python versions excluded by new constraintsThe
|
||||||||||
| requires-python = ">=3.7, <=3.12" | |
| requires-python = ">=3.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pydantic v2 incompatibility due to removed version constraint
The pydantic version constraint >=1.10,<2 was removed from pyproject.toml, but the code in src/keras2c/types.py uses pydantic v1-specific APIs that don't exist in pydantic v2. Specifically, update_forward_refs() (replaced by model_rebuild() in v2) and nested class Config: (replaced by model_config = ConfigDict(...) in v2) will cause runtime errors when pydantic 2.x is installed. Meanwhile, requirements.txt and environment.yml still retain the <2 constraint, creating an inconsistency where pip installs may break while conda installs work.
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing version constraints from numpy and pydantic dependencies can lead to compatibility issues. The original constraints (numpy>=1.13.0 and pydantic>=1.10,<2) were likely in place for good reasons. Specifically, pydantic v2 introduced breaking changes from v1, so removing the upper bound could break existing code. Consider keeping at least the pydantic version constraint to avoid unexpected breaking changes.
| "numpy", | |
| "pydantic", | |
| "numpy>=1.13.0", | |
| "pydantic>=1.10,<2", |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,3 @@ | |
| numpy >= 1.13.0 | ||
| tensorflow >= 2.0 | ||
| pydantic >= 1.10, <2 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,9 @@ | ||||||||
| Metadata-Version: 2.4 | ||||||||
| Metadata-Version: 2.1 | ||||||||
| Name: keras2c | ||||||||
| Version: 0.1 | ||||||||
| Summary: A library for converting Keras neural networks to real-time compatible C. | ||||||||
| Author-email: Rory Conlin <wconlin@princeton.edu>, Keith Erickson <kerickso@pppl.gov>, Joseph Abbate <jabbate@princeton.edu>, Egemen Kolemen <ekolemen@princeton.edu> | ||||||||
| Maintainer-email: Peter Steiner <peter.steiner@princeton.edu> | ||||||||
| Maintainer-email: Peter Steiner <peter.steiner@princeton.edu>, Nathaniel Chen <nathaniel@princeton.edu> | ||||||||
| License: LGPLv3 License | ||||||||
| Project-URL: Documentation, https://f0uriest.github.io/keras2c/ | ||||||||
| Project-URL: Repository, https://github.com/f0uriest/keras2c/ | ||||||||
|
|
@@ -19,15 +19,13 @@ Classifier: Programming Language :: Python :: 3.9 | |||||||
| Classifier: Programming Language :: Python :: 3.10 | ||||||||
| Classifier: Programming Language :: Python :: 3.11 | ||||||||
| Classifier: Programming Language :: Python :: 3.12 | ||||||||
| Classifier: Programming Language :: Python :: 3.13 | ||||||||
| Requires-Python: >=3.7 | ||||||||
| Requires-Python: <=3.12,>=3.7 | ||||||||
|
||||||||
| Requires-Python: <=3.12,>=3.7 | |
| Classifier: Programming Language :: Python :: 3.13 | |
| Requires-Python: >=3.7 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||
| tensorflow>=2.0 | ||||||
| keras | ||||||
| numpy>=1.13.0 | ||||||
| pydantic<2,>=1.10 | ||||||
| numpy | ||||||
|
||||||
| numpy | |
| numpy>=1.13.0 |
Copilot
AI
Dec 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the version constraint from pydantic (was "pydantic<2,>=1.10") is a critical issue. Pydantic v2 introduced significant breaking changes from v1, including changes to the API, validation behavior, and configuration. Without this constraint, users could inadvertently install pydantic v2 and encounter runtime errors or unexpected behavior. This constraint should be retained to prevent breaking changes.
| pydantic | |
| pydantic<2,>=1.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step name was changed from "Set up Python 3.10" to "Set up Python", but the comment is somewhat misleading since the version is parameterized through the matrix strategy rather than being hardcoded. While this change improves flexibility, consider whether the workflow matrix actually includes all the Python versions the package claims to support (3.7-3.12 based on the new constraints).