Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
0b4a7f1a
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0b4a7f1a
编写于
6月 16, 2021
作者:
T
tianshuo78520a
提交者:
GitHub
6月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
del python2 code (#33556)
上级
78a9870f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
8 addition
and
17 deletion
+8
-17
CMakeLists.txt
CMakeLists.txt
+1
-1
python/requirements.txt
python/requirements.txt
+1
-2
python/unittest_py/requirements.txt
python/unittest_py/requirements.txt
+2
-4
tools/count_api_without_core_ops.py
tools/count_api_without_core_ops.py
+1
-4
tools/print_signatures.py
tools/print_signatures.py
+2
-5
tools/sampcd_processor.py
tools/sampcd_processor.py
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
0b4a7f1a
...
@@ -216,7 +216,7 @@ option(WITH_STRIP "Strip so files of Whl packages" OFF)
...
@@ -216,7 +216,7 @@ option(WITH_STRIP "Strip so files of Whl packages" OFF)
# PY_VERSION
# PY_VERSION
if
(
NOT PY_VERSION
)
if
(
NOT PY_VERSION
)
set
(
PY_VERSION
2
.7
)
set
(
PY_VERSION
3
.7
)
endif
()
endif
()
set
(
PYBIND11_PYTHON_VERSION
${
PY_VERSION
}
)
set
(
PYBIND11_PYTHON_VERSION
${
PY_VERSION
}
)
...
...
python/requirements.txt
浏览文件 @
0b4a7f1a
requests>=2.20.0
requests>=2.20.0
numpy>=1.13, <=1.16.4 ; python_version<"3.5"
numpy>=1.13 ; python_version>="3.5" and platform_system != "Windows"
numpy>=1.13 ; python_version>="3.5" and platform_system != "Windows"
numpy>=1.13, <=1.19.3 ; python_version>="3.5" and platform_system == "Windows"
numpy>=1.13, <=1.19.3 ; python_version>="3.5" and platform_system == "Windows"
protobuf>=3.1.0
protobuf>=3.1.0
...
@@ -7,5 +6,5 @@ gast>=0.3.3 ; platform_system != "Windows"
...
@@ -7,5 +6,5 @@ gast>=0.3.3 ; platform_system != "Windows"
gast==0.3.3 ; platform_system == "Windows"
gast==0.3.3 ; platform_system == "Windows"
Pillow
Pillow
six
six
decorator
==4.4.2
decorator
astor
astor
python/unittest_py/requirements.txt
浏览文件 @
0b4a7f1a
...
@@ -4,10 +4,8 @@ pycrypto ; platform_system != "Windows"
...
@@ -4,10 +4,8 @@ pycrypto ; platform_system != "Windows"
mock
mock
gym
gym
opencv-python<=4.2.0.32
opencv-python<=4.2.0.32
visualdl
; python_version>="3.5"
visualdl
paddle2onnx>=0.4
paddle2onnx>=0.4
scipy>=0.19.0, <=1.2.1 ; python_version<"3.5"
scipy
scipy<=1.3.1 ; python_version=="3.5"
scipy ; python_version>"3.5"
prettytable
prettytable
distro
distro
tools/count_api_without_core_ops.py
浏览文件 @
0b4a7f1a
...
@@ -37,10 +37,7 @@ omitted_list = [
...
@@ -37,10 +37,7 @@ omitted_list = [
def
md5
(
doc
):
def
md5
(
doc
):
try
:
try
:
hashinst
=
hashlib
.
md5
()
hashinst
=
hashlib
.
md5
()
if
platform
.
python_version
()[
0
]
==
"2"
:
hashinst
.
update
(
str
(
doc
).
encode
(
'utf-8'
))
hashinst
.
update
(
str
(
doc
))
else
:
hashinst
.
update
(
str
(
doc
).
encode
(
'utf-8'
))
md5sum
=
hashinst
.
hexdigest
()
md5sum
=
hashinst
.
hexdigest
()
except
UnicodeDecodeError
as
e
:
except
UnicodeDecodeError
as
e
:
md5sum
=
None
md5sum
=
None
...
...
tools/print_signatures.py
浏览文件 @
0b4a7f1a
...
@@ -50,10 +50,7 @@ console.setFormatter(
...
@@ -50,10 +50,7 @@ console.setFormatter(
def
md5
(
doc
):
def
md5
(
doc
):
try
:
try
:
hashinst
=
hashlib
.
md5
()
hashinst
=
hashlib
.
md5
()
if
platform
.
python_version
()[
0
]
==
"2"
:
hashinst
.
update
(
str
(
doc
).
encode
(
'utf-8'
))
hashinst
.
update
(
str
(
doc
))
else
:
hashinst
.
update
(
str
(
doc
).
encode
(
'utf-8'
))
md5sum
=
hashinst
.
hexdigest
()
md5sum
=
hashinst
.
hexdigest
()
except
UnicodeDecodeError
as
e
:
except
UnicodeDecodeError
as
e
:
md5sum
=
None
md5sum
=
None
...
@@ -156,7 +153,7 @@ def visit_member(parent_name, member, member_name=None):
...
@@ -156,7 +153,7 @@ def visit_member(parent_name, member, member_name=None):
def
is_primitive
(
instance
):
def
is_primitive
(
instance
):
int_types
=
(
int
,
long
)
if
platform
.
python_version
()[
0
]
==
"2"
else
(
int
,
)
int_types
=
(
int
,
)
pritimitive_types
=
int_types
+
(
float
,
str
)
pritimitive_types
=
int_types
+
(
float
,
str
)
if
isinstance
(
instance
,
pritimitive_types
):
if
isinstance
(
instance
,
pritimitive_types
):
return
True
return
True
...
...
tools/sampcd_processor.py
浏览文件 @
0b4a7f1a
...
@@ -390,7 +390,7 @@ def execute_samplecode(tfname):
...
@@ -390,7 +390,7 @@ def execute_samplecode(tfname):
"""
"""
result
=
True
result
=
True
msg
=
None
msg
=
None
if
platform
.
python_version
()[
0
]
in
[
"
2"
,
"
3"
]:
if
platform
.
python_version
()[
0
]
in
[
"3"
]:
cmd
=
[
sys
.
executable
,
tfname
]
cmd
=
[
sys
.
executable
,
tfname
]
else
:
else
:
logger
.
error
(
"Error: fail to parse python version!"
)
logger
.
error
(
"Error: fail to parse python version!"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录