Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
da0022e4
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
da0022e4
编写于
12月 01, 2022
作者:
M
Matsumoto Ruko
提交者:
GitHub
12月 01, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CodeStyle][py36] remove sys.version branch for py36 (#48540)
上级
89db045a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
19 deletion
+8
-19
python/paddle/distributed/fleet/data_generator/data_generator.py
...paddle/distributed/fleet/data_generator/data_generator.py
+2
-2
python/paddle/distributed/metric/metrics.py
python/paddle/distributed/metric/metrics.py
+2
-5
tools/dockerfile/build_scripts/ssl-check.py
tools/dockerfile/build_scripts/ssl-check.py
+4
-12
未找到文件。
python/paddle/distributed/fleet/data_generator/data_generator.py
浏览文件 @
da0022e4
...
@@ -262,7 +262,7 @@ class MultiSlotStringDataGenerator(DataGenerator):
...
@@ -262,7 +262,7 @@ class MultiSlotStringDataGenerator(DataGenerator):
Returns:
Returns:
Return a string data that can be read directly by the MultiSlotDataFeed.
Return a string data that can be read directly by the MultiSlotDataFeed.
'''
'''
if
sys
.
version
>
'3'
and
isinstance
(
line
,
zip
):
if
isinstance
(
line
,
zip
):
line
=
list
(
line
)
line
=
list
(
line
)
if
not
isinstance
(
line
,
list
)
and
not
isinstance
(
line
,
tuple
):
if
not
isinstance
(
line
,
list
)
and
not
isinstance
(
line
,
tuple
):
...
@@ -311,7 +311,7 @@ class MultiSlotDataGenerator(DataGenerator):
...
@@ -311,7 +311,7 @@ class MultiSlotDataGenerator(DataGenerator):
Returns:
Returns:
Return a string data that can be read directly by the MultiSlotDataFeed.
Return a string data that can be read directly by the MultiSlotDataFeed.
'''
'''
if
sys
.
version
>
'3'
and
isinstance
(
line
,
zip
):
if
isinstance
(
line
,
zip
):
line
=
list
(
line
)
line
=
list
(
line
)
if
not
isinstance
(
line
,
list
)
and
not
isinstance
(
line
,
tuple
):
if
not
isinstance
(
line
,
list
)
and
not
isinstance
(
line
,
tuple
):
...
...
python/paddle/distributed/metric/metrics.py
浏览文件 @
da0022e4
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
logging
import
logging
import
sys
import
yaml
import
yaml
...
@@ -36,10 +35,8 @@ def init_metric(
...
@@ -36,10 +35,8 @@ def init_metric(
bucket_size
=
1000000
,
bucket_size
=
1000000
,
):
):
yaml_fobj
=
open
(
metric_yaml_path
)
yaml_fobj
=
open
(
metric_yaml_path
)
if
sys
.
version
.
startswith
(
'2.7.13'
):
content
=
yaml
.
load
(
yaml_fobj
)
content
=
yaml
.
load
(
yaml_fobj
,
Loader
=
yaml
.
FullLoader
)
else
:
content
=
yaml
.
load
(
yaml_fobj
,
Loader
=
yaml
.
FullLoader
)
print
(
"yaml metric config:
\n
"
)
print
(
"yaml metric config:
\n
"
)
print
(
content
)
print
(
content
)
...
...
tools/dockerfile/build_scripts/ssl-check.py
浏览文件 @
da0022e4
...
@@ -14,22 +14,14 @@
...
@@ -14,22 +14,14 @@
# cf. https://github.com/pypa/manylinux/issues/53
# cf. https://github.com/pypa/manylinux/issues/53
import
sys
from
urllib.request
import
urlopen
GOOD_SSL
=
"https://google.com"
GOOD_SSL
=
"https://google.com"
BAD_SSL
=
"https://self-signed.badssl.com"
BAD_SSL
=
"https://self-signed.badssl.com"
import
sys
print
(
"Testing SSL certificate checking for Python:"
,
sys
.
version
)
print
(
"Testing SSL certificate checking for Python:"
,
sys
.
version
)
if
sys
.
version_info
[
0
]
>=
3
:
from
urllib.request
import
urlopen
EXC
=
OSError
else
:
from
urllib
import
urlopen
EXC
=
IOError
print
(
"Connecting to %s should work"
%
(
GOOD_SSL
,))
print
(
"Connecting to %s should work"
%
(
GOOD_SSL
,))
urlopen
(
GOOD_SSL
)
urlopen
(
GOOD_SSL
)
print
(
"...it did, yay."
)
print
(
"...it did, yay."
)
...
@@ -40,5 +32,5 @@ try:
...
@@ -40,5 +32,5 @@ try:
# If we get here then we failed:
# If we get here then we failed:
print
(
"...it DIDN'T!!!!!11!!1one!"
)
print
(
"...it DIDN'T!!!!!11!!1one!"
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
except
EXC
:
except
OSError
:
print
(
"...it did, yay."
)
print
(
"...it did, yay."
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录