You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/04/13 22:36:55 UTC

[GitHub] [incubator-mxnet] zhreshold commented on a change in pull request #14659: [WIP][Don't merge] remove pickle in gluon dataloader

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:
users@infra.apache.org


With regards,
Apache Git Services