Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
e5a6bb1d
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
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看板
未验证
提交
e5a6bb1d
编写于
6月 22, 2021
作者:
D
danleifeng
提交者:
GitHub
6月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adaptive for py3 for ps util;test=develop (#33727)
上级
687571f2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
8 deletion
+11
-8
python/paddle/fluid/distributed/node.py
python/paddle/fluid/distributed/node.py
+2
-0
python/paddle/fluid/incubate/fleet/base/fleet_base.py
python/paddle/fluid/incubate/fleet/base/fleet_base.py
+1
-1
python/paddle/fluid/incubate/fleet/utils/fleet_util.py
python/paddle/fluid/incubate/fleet/utils/fleet_util.py
+4
-4
python/paddle/fluid/incubate/fleet/utils/http_server.py
python/paddle/fluid/incubate/fleet/utils/http_server.py
+4
-3
未找到文件。
python/paddle/fluid/distributed/node.py
浏览文件 @
e5a6bb1d
...
...
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
import
ps_pb2
as
pslib
# NOTE: reduce removed in fuctools in python3
from
functools
import
reduce
class
Server
(
object
):
...
...
python/paddle/fluid/incubate/fleet/base/fleet_base.py
浏览文件 @
e5a6bb1d
...
...
@@ -181,7 +181,7 @@ class Fleet(object):
trainers
=
self
.
worker_num
()
remainder
=
len
(
files
)
%
trainers
blocksize
=
len
(
files
)
/
trainers
blocksize
=
len
(
files
)
/
/
trainers
blocks
=
[
blocksize
]
*
trainers
for
i
in
range
(
remainder
):
...
...
python/paddle/fluid/incubate/fleet/utils/fleet_util.py
浏览文件 @
e5a6bb1d
...
...
@@ -244,7 +244,7 @@ class FleetUtil(object):
new_pos
=
0.0
new_neg
=
0.0
total_ins_num
=
0
for
i
in
x
range
(
num_bucket
):
for
i
in
range
(
num_bucket
):
index
=
num_bucket
-
1
-
i
new_pos
=
pos
+
global_pos
[
0
][
index
]
total_ins_num
+=
global_pos
[
0
][
index
]
...
...
@@ -1240,8 +1240,8 @@ class FleetUtil(object):
hours
=
os
.
popen
(
"echo -n "
+
hours
).
read
().
split
(
" "
)
split_interval
=
int
(
split_interval
)
split_per_pass
=
int
(
split_per_pass
)
splits_per_day
=
24
*
60
/
split_interval
pass_per_day
=
splits_per_day
/
split_per_pass
splits_per_day
=
24
*
60
/
/
split_interval
pass_per_day
=
splits_per_day
/
/
split_per_pass
left_train_hour
=
int
(
hours
[
0
])
right_train_hour
=
int
(
hours
[
-
1
])
...
...
@@ -1425,7 +1425,7 @@ class FleetUtil(object):
relative_ctr_error
=
0.0
k_max_span
=
0.01
k_relative_error_bound
=
0.05
for
i
in
x
range
(
num_bucket
):
for
i
in
range
(
num_bucket
):
click
=
global_pos
[
0
][
i
]
show
=
global_pos
[
0
][
i
]
+
global_neg
[
0
][
i
]
ctr
=
float
(
i
)
/
num_bucket
...
...
python/paddle/fluid/incubate/fleet/utils/http_server.py
浏览文件 @
e5a6bb1d
...
...
@@ -14,8 +14,9 @@
"""Http Server."""
import
logging
import
BaseHTTPServer
import
SimpleHTTPServer
# NOTE: HTTPServer has a different name in python2 and python3
from
http.server
import
HTTPServer
import
http.server
as
SimpleHTTPServer
import
time
import
threading
import
socket
...
...
@@ -123,7 +124,7 @@ class KVHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self
.
end_headers
()
class
KVHTTPServer
(
BaseHTTPServer
.
HTTPServer
,
object
):
class
KVHTTPServer
(
HTTPServer
,
object
):
"""
it is a http server storing kv pairs.
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录