-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix local recordio reader #3479
Conversation
3914045
to
785db4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
path = paths | ||
else: | ||
path = ",".join(paths) | ||
f = rec.reader(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When training on distributed environment, reader should fetch only a part of all the data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typhoonzero The files will be read file by file. If we need to fetch only part of the data, maybe we can split them to different files. cloud_reader
is much better for the distributed training environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cloud_reader
is using master to dispatch tasks, I think we still need a version with out master, or master can dispatch files rather than recordio. This is in case that there are still many cases using Mapreduce output directly as training inputs.
Anyway, will discuss in another issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks. The recordio file will be read entirely to parse the index before reading the first item, so in that case we need to shard the files.
@@ -57,7 +57,7 @@ def reader(): | |||
return reader | |||
|
|||
|
|||
def recordio_local(paths, buf_size=100): | |||
def recordio(paths, buf_size=100): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to recordio_reader
to indicate it's a reader?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typhoonzero It's used as paddle.v2.reader.creator.recordio
, probably reader
is indicated in the import path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
No description provided.