Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[gluon][transform]fix unpicklable transform_first on windows #13686

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

zhreshold
Copy link
Member

Description

Allow windows user to properly use Dataset.transform_first in combination with num_workers > 0
The original problem is caused by nested function which cannot be pickled in transform_first

Reproduceable following http:https://en.diveintodeeplearning.org/chapter_deep-learning-basics/fashion-mnist.html and set num_workers > 0 on windows machine

  • Removed nested function and use callable object instead.
  • Test case added

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http:https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@zhreshold zhreshold requested a review from szha as a code owner December 19, 2018 07:01
@zhreshold
Copy link
Member Author

@astonzhang

@astonzhang
Copy link
Member

Thanks for the fix!

@zhreshold
Copy link
Member Author

@eric-haibin-lin Can you help review and merge? Aston is eager to include it in 1.4 so readers using windows don't need to struggle with dependencies.

@eric-haibin-lin eric-haibin-lin merged commit 61744b5 into apache:master Dec 19, 2018
eric-haibin-lin pushed a commit to eric-haibin-lin/mxnet that referenced this pull request Dec 19, 2018
astonzhang added a commit to astonzhang/incubator-mxnet that referenced this pull request Dec 19, 2018
@astonzhang astonzhang mentioned this pull request Dec 19, 2018
6 tasks
eric-haibin-lin pushed a commit that referenced this pull request Dec 19, 2018
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants