You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
takes a lot of time when the output is big (f.e., when a model returns a large logits tensor), because the whole object is being serialized into memory and then deserialized. I wonder what are the cases in which check_pickable helps, as dataclasses and ModelOutput should be as pickable as its dictionary representation.
Describe a requested feature
I was running some performance tests and I noticed that checking if an object is pickable:
parallelformers/parallelformers/parallel/process.py
Line 209 in ccaea51
check_pickable
helps, as dataclasses andModelOutput
should be as pickable as its dictionary representation.If the check is still needed, I guess the code could be still sped up by modifying an object only on pickle failure. That would require some workarounds (perhaps overriding https://github.com/python/cpython/blob/9dc787ea96916552695e79397588fdfa68f22024/Lib/multiprocessing/queues.py#L275) so I want to make sure the check is still necessary, before giving it a shot. Another option is to always check for
parallelformers/parallelformers/parallel/process.py
Lines 236 to 239 in ccaea51
The text was updated successfully, but these errors were encountered: