Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Conversation

@szhengac
Copy link
Member

Description

Fix #274

Checklist

Essentials

  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Changes

  • update sharded dataloader

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@szhengac szhengac requested a review from szha as a code owner August 14, 2018 08:59
@szhengac szhengac assigned leezu and unassigned leezu Aug 14, 2018
@szhengac szhengac requested review from leezu and zhreshold August 14, 2018 08:59
@leezu
Copy link
Contributor

leezu commented Aug 14, 2018

Can you shortly describe what caused the deadlock? Was it due to upstream mxnet change? Nevermind, I saw the discussion in #274

from mxnet.gluon.data.dataloader import Queue, SimpleQueue, DataLoader, _MultiWorkerIter
import threading
from mxnet import context
from mxnet.gluon.data.dataloader import Queue, SimpleQueue, DataLoader, \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to put them in the iterator otherwise gluonnlp will instantly depend on the latest mxnet master

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you are right

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we can let DataLoader takes function worker_loop as an argument in init function. This can makes the code cleaner.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhreshold gluon-nlp already depends on mxnet master, so it's no problem that this change also requires mxnet master. As far as I understand, your change in mxnet will be part of the 1.3 release?

After the coming release, it would be great if we can reduce the duplication of DataLoader code in gluonnlp. Does @szhengac's suggestion sound good to you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would agree to add an more customizable option to data loader iter, in terms of every aspect.
@szhengac Yes you are good to go with the mxnet, let me know if you have concerns.

@szha szha mentioned this pull request Aug 14, 2018
20 tasks
Copy link
Contributor

@leezu leezu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast fix!

@szha
Copy link
Member

szha commented Aug 15, 2018

@szhengac mentioned that he'd add the option upstream to mxnet and include that in the fix.

@szha szha merged commit 0316eef into dmlc:master Aug 15, 2018
@szhengac szhengac deleted the dataloader branch August 15, 2018 06:38
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.

5 participants