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

Suggestion: transition from marshmallow to pydantic 2 #4037

Open
ksbrar opened this issue Oct 25, 2024 · 2 comments
Open

Suggestion: transition from marshmallow to pydantic 2 #4037

ksbrar opened this issue Oct 25, 2024 · 2 comments

Comments

@ksbrar
Copy link
Collaborator

ksbrar commented Oct 25, 2024

Hey @mhabedank ,

Not to add to your workload - I just noticed you closing lots of tickets and PRs recently.

Just one suggestion (which you are already probably aware of): I would strongly consider transitioning the schemas at some point from marshmallow to Pydantic 2, which should have all of the flexibility Ludwig needs. Pointedly, I would remove the dependency on marshmallow-jsonschema first, because it has gone unmaintained for over 2 years and caused a bit of dependency hell, holding back further iteration. It's a tough one because it's inherent to the dataclass-centric design of the schemas (one dataclass = one json schema), but it's necessary IMO (though if you moved to Pydantic you would get back the dataclass-centric design anyways).

@mhabedank
Copy link
Collaborator

Hi @ksbrar, you mention my favorite word of the last 2 weeks: dependency. :-)
We are currently working intensively on straightening out various dependencies, as they ensure that Ludwig is no longer usable at all on many systems. Just to name a few: torchtext, ray, numpy, etc. I'll take a look at the topic of marshmellow/pydantic. I already had the idea that the data classes should be defined language-agnostically in order to improve the implementation of third-party tools.
One question for you: Would you have time to take care of this?

@ksbrar
Copy link
Collaborator Author

ksbrar commented Oct 29, 2024

@mhabedank Unfortunately I don't have time at the moment, but I may as we get closer to the holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants