Add new method for custom formatter handling#293
Conversation
|
I seem to have issues with running tests locally, thus the open todo. There are multiple test that seem to fail with issue where some of the tensor are on GPU and some on CPU. I wonder if the test are to be run on no GPU setup? |
|
Ah, don't try to run all tests locally, it will take forever. I've just enabled the CI for this PR, it should also rerun automatically now when you push new changes. But thanks for also adding tests! I only run them on CPU, so not sure how things go with a GPU. I have not looked at the implementation yet and might not have time to test it in the next 2 weeks, just as a heads-up. |
0c4836c to
ed0bfcc
Compare
eginhard
left a comment
There was a problem hiding this comment.
Thanks a lot again for this PR! Really sorry it took me a long time to get to this. Everything worked well in my tests. I just added a small change to store the formatter functions in a dictionary to avoid having to manipulate the module, that seems cleaner to me.
Adding a method for setting new formatter into the native formatter handling. This does not change how the existing solutions work, and thus should not cause any backwards compatibility issue. But also allows user to implement multiple custom formatters and allows using them in datasets according to their name just like the builtin formatters. This solves both problems from the issue #290 as the the custom formatter is handled just like builtin ones.
Adding:
Testing:
ToDo:
Fixes #290