Skip to content
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

Merged
merged 3 commits into from
Aug 15, 2017
Merged

Conversation

helinwang
Copy link
Contributor

No description provided.

@helinwang helinwang force-pushed the recordio branch 2 times, most recently from 3914045 to 785db4e Compare August 14, 2017 22:20
Copy link
Contributor

@gongweibao gongweibao left a 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)
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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):
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

LGTM++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants