-
Notifications
You must be signed in to change notification settings - Fork 67
Fix configuration of a custom serializers for one of the predefined types #125
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
Fix configuration of a custom serializers for one of the predefined types #125
Conversation
… predefined types
Hey @enrico-stauss. Thanks for your contribution :) Would you mind adding a test ? |
…zers in the beginning
for more information, see https://pre-commit.ci
Hi @tchaton, I changed my modification s.t. it preserves the original order of the serializers apart from placing explicitly specified serializers in the beginning. Now the test that failed should work. Also I implemented a test that assures that a custom implementation for a predefined serializer type is preferred over the default one. I have to note however, that the use of an OrderedDict and relying on the oder of the serializers seems to be quite error-prone. Anyway I hope it helps and I appreciate your work! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #125 +/- ##
=====================================
Coverage ? 76%
=====================================
Files ? 30
Lines ? 3970
Branches ? 0
=====================================
Hits ? 3015
Misses ? 955
Partials ? 0 |
Yeah, I know. We are trying to be smart to reduce the user overhead, but this leads to the annoyance of this ordered serialiser list where we check types against them. There is probably a better design to auto-infer the format but I didn't have time to look into it. Feel free to give it a try, pretty sure it is a fun problem to solve. |
Hi @tchaton, |
Thanks @enrico-stauss for contributing already. |
Before submitting
What does this PR do?
This is only a suggestion. When experimenting with litdata I tried to fix the
no_header_tensor
serializer issue by replacing it with a custom subclass. I noticed that my custom subclass was not applied and tracked it down to the modified bit.PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃