-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[BUGFIX] Cnn_dailymail and xnli raise error when downloading in multi-gpus mode #1587
Conversation
paddlenlp/datasets/xnli.py
Outdated
.trainer_endpoints[:]) | ||
if ParallelEnv().current_endpoint in unique_endpoints: | ||
file_num = len(os.listdir(fullname)) | ||
if file_num != 15: |
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.
对于magic number需要进行额外注释
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.
DONE, thx
.trainer_endpoints[:]) | ||
if ParallelEnv().current_endpoint in unique_endpoints: | ||
file_num = len(os.listdir(fullname)) | ||
if file_num != len(ALL_LANGUAGES): |
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.
这里稍微说明下背景,相比其他数据集这里多了file_num = len(os.listdir(os.path.join(dir_path, "stories")))
,这个在多进程下有些问题,当前多进程下载解压机制假定了_get_data
中的文件相关操作是制定节点上的,咱们数据集依赖的 get_path_from_url
是符合这个假设的,这避免了绝大部分数据集多进程下载解压的问题,这里的file_num = len(os.listdir(os.path.join(dir_path, "stories")))
不太一样,这个PR是临时修复办法,后续可以在从数据集层面解决下
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.
这里稍微说明下背景,相比其他数据集这里多了
file_num = len(os.listdir(os.path.join(dir_path, "stories")))
,这个在多进程下有些问题,当前多进程下载解压机制假定了_get_data
中的文件相关操作是制定节点上的,咱们数据集依赖的get_path_from_url
是符合这个假设的,这避免了绝大部分数据集多进程下载解压的问题,这里的file_num = len(os.listdir(os.path.join(dir_path, "stories")))
不太一样,这个PR是临时修复办法,后续可以在从数据集层面解决下
好的 Thx
PR types
Bug fixes
PR changes
Others
Description