-
Notifications
You must be signed in to change notification settings - Fork 165
Add backend switch for IterDataPipe.__getstate__
#341
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
Comments
Do we still want a backend switch? I think we have revamped the usage of |
I think with |
Unless The reason we ( cc @NicolasHug |
It was my understanding from past meetings that this would be the case. Perhaps one of you can confirm? In which case, as Philip already mentioned, we won't need the switch (I might still keep pytorch/vision#5938 open for a bit though, to help me sleep at night :) ) |
I agree that the goal is still have the same behavior whether |
The problem is that we will need to patch every single module where this is imported. You cannot patch the place where it is defined, but rather where it is used. If you look above, we are not patching
._utils.serialization
but rather.datapipes.datapipe
, because this is where the flag is used. If we now need use this flag in multiple modules, we need to patch all of them. This is very brittle.Not sure I understand. If we just keep the same detection as we have now, users that don't care should not see any difference. If
dill
is available, it will be picked up and otherwisepickle
will be used. But it would give users the option to enforce a particular backend if they need to. Without this option, the environment you use has an effect on the functionality and there is no way change that. I don't think this is good design.Even if you don't do it for the users, think about how you want to test
pickle
vsdill
yourself. Right now the only option is to have two separate workflows one withdill
installed and one without.Originally posted by @pmeier in pytorch/vision#5711 (comment)
The text was updated successfully, but these errors were encountered: