Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleRec
提交
765870b2
P
PaddleRec
项目概览
PaddlePaddle
/
PaddleRec
通知
68
Star
12
Fork
5
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
27
列表
看板
标记
里程碑
合并请求
10
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
27
Issue
27
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
765870b2
编写于
9月 02, 2020
作者:
L
liuyuhui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add formatted warnings
上级
20fb78d3
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
7 addition
and
6 deletion
+7
-6
core/utils/dataloader_instance.py
core/utils/dataloader_instance.py
+7
-6
未找到文件。
core/utils/dataloader_instance.py
浏览文件 @
765870b2
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
os
import
os
import
warnings
from
paddlerec.core.utils.envs
import
lazy_instance_by_fliename
from
paddlerec.core.utils.envs
import
lazy_instance_by_fliename
from
paddlerec.core.utils.envs
import
get_global_env
from
paddlerec.core.utils.envs
import
get_global_env
from
paddlerec.core.utils.envs
import
get_runtime_environ
from
paddlerec.core.utils.envs
import
get_runtime_environ
...
@@ -52,8 +53,8 @@ def dataloader_by_name(readerclass,
...
@@ -52,8 +53,8 @@ def dataloader_by_name(readerclass,
selected_gpu_nums
=
int
(
os
.
getenv
(
"PADDLEREC_GPU_NUMS"
))
selected_gpu_nums
=
int
(
os
.
getenv
(
"PADDLEREC_GPU_NUMS"
))
discard_file_nums
=
len
(
files
)
%
selected_gpu_nums
discard_file_nums
=
len
(
files
)
%
selected_gpu_nums
if
(
discard_file_nums
!=
0
):
if
(
discard_file_nums
!=
0
):
print
(
warnings
.
warn
(
"
Warning: bea
cause files cannot be divided equally between GPUs,discard these files:{}"
.
"
Be
cause files cannot be divided equally between GPUs,discard these files:{}"
.
format
(
files
[
-
discard_file_nums
:]))
format
(
files
[
-
discard_file_nums
:]))
files
=
files
[:
len
(
files
)
-
discard_file_nums
]
files
=
files
[:
len
(
files
)
-
discard_file_nums
]
...
@@ -124,8 +125,8 @@ def slotdataloader_by_name(readerclass, dataset_name, yaml_file, context):
...
@@ -124,8 +125,8 @@ def slotdataloader_by_name(readerclass, dataset_name, yaml_file, context):
selected_gpu_nums
=
int
(
os
.
getenv
(
"PADDLEREC_GPU_NUMS"
))
selected_gpu_nums
=
int
(
os
.
getenv
(
"PADDLEREC_GPU_NUMS"
))
discard_file_nums
=
len
(
files
)
%
selected_gpu_nums
discard_file_nums
=
len
(
files
)
%
selected_gpu_nums
if
(
discard_file_nums
!=
0
):
if
(
discard_file_nums
!=
0
):
print
(
warnings
.
warn
(
"
Warning: beacause files cannot be divided equally between GPUs,
discard these files:{}"
.
"
Because files cannot be divided equally between GPUs,
discard these files:{}"
.
format
(
files
[
-
discard_file_nums
:]))
format
(
files
[
-
discard_file_nums
:]))
files
=
files
[:
len
(
files
)
-
discard_file_nums
]
files
=
files
[:
len
(
files
)
-
discard_file_nums
]
...
@@ -204,8 +205,8 @@ def slotdataloader(readerclass, train, yaml_file, context):
...
@@ -204,8 +205,8 @@ def slotdataloader(readerclass, train, yaml_file, context):
selected_gpu_nums
=
int
(
os
.
getenv
(
"PADDLEREC_GPU_NUMS"
))
selected_gpu_nums
=
int
(
os
.
getenv
(
"PADDLEREC_GPU_NUMS"
))
discard_file_nums
=
len
(
files
)
%
selected_gpu_nums
discard_file_nums
=
len
(
files
)
%
selected_gpu_nums
if
(
discard_file_nums
!=
0
):
if
(
discard_file_nums
!=
0
):
print
(
warnings
.
warn
(
"
Warning: bea
cause files cannot be divided equally between GPUs,discard these files:{}"
.
"
Be
cause files cannot be divided equally between GPUs,discard these files:{}"
.
format
(
files
[
-
discard_file_nums
:]))
format
(
files
[
-
discard_file_nums
:]))
files
=
files
[:
len
(
files
)
-
discard_file_nums
]
files
=
files
[:
len
(
files
)
-
discard_file_nums
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录