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

ValueError when exporting ngen.config LSTM and BMIPython json schemas's #36

Closed
aaraney opened this issue Nov 17, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working ngen-conf Related to ngen-conf package

Comments

@aaraney
Copy link
Member

aaraney commented Nov 17, 2022

I receive the following exception when exporting either LSTM's or BMIPython's json schema. Likewise, this affect all classes that either inherit or compose these classes.

ValueError: Value not declarable with JSON Schema, field: name='python_type_PyObject' type=PyObject required=True

I verified this issue is coming from use of pydantic.PyObject as a type hint is the above models. Ive not looked into possible solutions for this, but im sure we can figure out a work around.

Reproduce

from ngen.config.realization import Realization

with open("Realization.schema.json", "w") as fp:
    fp.write(Realization.schema_json(indent=2))
@aaraney aaraney added bug Something isn't working ngen-conf Related to ngen-conf package labels Nov 17, 2022
@aaraney aaraney assigned hellkite500 and aaraney and unassigned aaraney Nov 17, 2022
@aaraney
Copy link
Member Author

aaraney commented Nov 21, 2023

Fixed by #68.

@aaraney aaraney closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ngen-conf Related to ngen-conf package
Projects
None yet
Development

No branches or pull requests

2 participants