zhreshold commented on a change in pull request #14659: [WIP][Don't merge]
remove pickle in gluon dataloader
URL: https://github.com/apache/incubator-mxnet/pull/14659#discussion_r275134804
##########
File path: python/mxnet/gluon/data/dataloader.py
##########
@@ -398,9 +398,7 @@ def _worker_fn(samples, batchify_fn, dataset=None):
# preserving dataset as global variable can save tons of overhead and is
safe in new process
global _worker_dataset
batch = batchify_fn([_worker_dataset[i] for i in samples])
- buf = io.BytesIO()
- ForkingPickler(buf, pickle.HIGHEST_PROTOCOL).dump(batch)
- return buf.getvalue()
+ return batch
Review comment:
pickle's protocol isn't quite consistent across versions.
this may or may not be a problem, however I don't have any benchmark result
to support either one.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services