Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
PaddleRec
提交
ba023dfb
P
PaddleRec
项目概览
BaiXuePrincess
/
PaddleRec
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleRec
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ba023dfb
编写于
5月 19, 2020
作者:
T
tangwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix import order
上级
8d82a06a
变更
57
显示空白变更内容
内联
并排
Showing
57 changed file
with
140 addition
and
78 deletion
+140
-78
core/engine/cluster/cluster.py
core/engine/cluster/cluster.py
+2
-2
core/engine/local_cluster.py
core/engine/local_cluster.py
+5
-3
core/engine/local_mpi.py
core/engine/local_mpi.py
+4
-3
core/metrics/auc_metrics.py
core/metrics/auc_metrics.py
+2
-0
core/model.py
core/model.py
+1
-0
core/modules/modul/build.py
core/modules/modul/build.py
+2
-1
core/modules/modul/layers.py
core/modules/modul/layers.py
+1
-0
core/trainer.py
core/trainer.py
+3
-3
core/trainers/ctr_coding_trainer.py
core/trainers/ctr_coding_trainer.py
+2
-1
core/trainers/ctr_modul_trainer.py
core/trainers/ctr_modul_trainer.py
+3
-3
core/trainers/online_learning_trainer.py
core/trainers/online_learning_trainer.py
+1
-1
core/trainers/single_trainer.py
core/trainers/single_trainer.py
+2
-2
core/trainers/tdm_cluster_trainer.py
core/trainers/tdm_cluster_trainer.py
+2
-0
core/trainers/tdm_single_trainer.py
core/trainers/tdm_single_trainer.py
+3
-2
core/utils/dataset.py
core/utils/dataset.py
+1
-1
core/utils/dataset_instance.py
core/utils/dataset_instance.py
+1
-0
core/utils/envs.py
core/utils/envs.py
+3
-3
core/utils/fs.py
core/utils/fs.py
+1
-0
core/utils/util.py
core/utils/util.py
+2
-1
models/contentunderstanding/classification/model.py
models/contentunderstanding/classification/model.py
+1
-2
models/contentunderstanding/classification/reader.py
models/contentunderstanding/classification/reader.py
+1
-1
models/contentunderstanding/tagspace/model.py
models/contentunderstanding/tagspace/model.py
+3
-2
models/contentunderstanding/tagspace/reader.py
models/contentunderstanding/tagspace/reader.py
+1
-1
models/match/dssm/synthetic_reader.py
models/match/dssm/synthetic_reader.py
+1
-0
models/multitask/esmm/esmm_infer_reader.py
models/multitask/esmm/esmm_infer_reader.py
+3
-3
models/multitask/esmm/esmm_reader.py
models/multitask/esmm/esmm_reader.py
+3
-3
models/multitask/esmm/model.py
models/multitask/esmm/model.py
+1
-2
models/multitask/mmoe/census_infer_reader.py
models/multitask/mmoe/census_infer_reader.py
+1
-2
models/multitask/mmoe/census_reader.py
models/multitask/mmoe/census_reader.py
+1
-2
models/multitask/mmoe/model.py
models/multitask/mmoe/model.py
+0
-1
models/multitask/share-bottom/census_infer_reader.py
models/multitask/share-bottom/census_infer_reader.py
+1
-0
models/rank/criteo_reader.py
models/rank/criteo_reader.py
+1
-0
models/rank/dcn/criteo_reader.py
models/rank/dcn/criteo_reader.py
+7
-3
models/rank/dcn/model.py
models/rank/dcn/model.py
+3
-1
models/rank/deepfm/criteo_reader.py
models/rank/deepfm/criteo_reader.py
+5
-2
models/rank/deepfm/model.py
models/rank/deepfm/model.py
+2
-1
models/rank/din/reader.py
models/rank/din/reader.py
+7
-3
models/rank/dnn/model.py
models/rank/dnn/model.py
+1
-0
models/rank/wide_deep/model.py
models/rank/wide_deep/model.py
+2
-1
models/rank/wide_deep/reader.py
models/rank/wide_deep/reader.py
+4
-1
models/rank/xdeepfm/criteo_reader.py
models/rank/xdeepfm/criteo_reader.py
+4
-1
models/recall/gnn/evaluate_reader.py
models/recall/gnn/evaluate_reader.py
+3
-1
models/recall/gnn/model.py
models/recall/gnn/model.py
+2
-1
models/recall/gnn/reader.py
models/recall/gnn/reader.py
+3
-1
models/recall/gru4rec/rsc15_infer_reader.py
models/recall/gru4rec/rsc15_infer_reader.py
+1
-0
models/recall/gru4rec/rsc15_reader.py
models/recall/gru4rec/rsc15_reader.py
+1
-0
models/recall/ssr/model.py
models/recall/ssr/model.py
+2
-3
models/recall/ssr/ssr_infer_reader.py
models/recall/ssr/ssr_infer_reader.py
+4
-1
models/recall/ssr/ssr_reader.py
models/recall/ssr/ssr_reader.py
+4
-1
models/recall/word2vec/model.py
models/recall/word2vec/model.py
+0
-1
models/recall/word2vec/preprocess.py
models/recall/word2vec/preprocess.py
+7
-2
models/recall/word2vec/w2v_evaluate_reader.py
models/recall/word2vec/w2v_evaluate_reader.py
+3
-0
models/recall/word2vec/w2v_reader.py
models/recall/word2vec/w2v_reader.py
+4
-1
models/treebased/tdm/model.py
models/treebased/tdm/model.py
+1
-1
run.py
run.py
+2
-2
setup.py
setup.py
+4
-1
tools/tools.py
tools/tools.py
+5
-4
未找到文件。
core/engine/cluster/cluster.py
浏览文件 @
ba023dfb
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
from
__future__
import
print_function
from
__future__
import
print_function
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
subprocess
import
os
import
copy
import
copy
import
os
import
subprocess
from
paddlerec.core.engine.engine
import
Engine
from
paddlerec.core.engine.engine
import
Engine
from
paddlerec.core.factory
import
TrainerFactory
from
paddlerec.core.factory
import
TrainerFactory
...
...
core/engine/local_cluster.py
浏览文件 @
ba023dfb
...
@@ -14,10 +14,12 @@
...
@@ -14,10 +14,12 @@
from
__future__
import
print_function
from
__future__
import
print_function
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
subprocess
import
sys
import
os
import
copy
import
copy
import
os
import
sys
import
subprocess
from
paddlerec.core.engine.engine
import
Engine
from
paddlerec.core.engine.engine
import
Engine
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
core/engine/local_mpi.py
浏览文件 @
ba023dfb
...
@@ -14,10 +14,11 @@
...
@@ -14,10 +14,11 @@
from
__future__
import
print_function
from
__future__
import
print_function
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
subprocess
import
sys
import
os
import
copy
import
copy
import
os
import
sys
import
subprocess
from
paddlerec.core.engine.engine
import
Engine
from
paddlerec.core.engine.engine
import
Engine
...
...
core/metrics/auc_metrics.py
浏览文件 @
ba023dfb
...
@@ -13,8 +13,10 @@
...
@@ -13,8 +13,10 @@
# limitations under the License.
# limitations under the License.
import
math
import
math
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.metric
import
Metric
from
paddlerec.core.metric
import
Metric
...
...
core/model.py
浏览文件 @
ba023dfb
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
import
abc
import
abc
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
core/modules/modul/build.py
浏览文件 @
ba023dfb
...
@@ -12,10 +12,11 @@
...
@@ -12,10 +12,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
yaml
import
copy
import
copy
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
import
yaml
from
paddlerec.core.model
import
Model
from
paddlerec.core.model
import
Model
from
paddlerec.core.utils
import
table
from
paddlerec.core.utils
import
table
...
...
core/modules/modul/layers.py
浏览文件 @
ba023dfb
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
# limitations under the License.
# limitations under the License.
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.layer
import
Layer
from
paddlerec.core.layer
import
Layer
...
...
core/trainer.py
浏览文件 @
ba023dfb
...
@@ -12,14 +12,14 @@
...
@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
import
sys
import
abc
import
abc
import
os
import
time
import
time
import
sys
import
yaml
import
yaml
from
paddle
import
fluid
from
paddle
import
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
core/trainers/ctr_coding_trainer.py
浏览文件 @
ba023dfb
...
@@ -11,9 +11,10 @@
...
@@ -11,9 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
import
os
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.base.role_maker
import
MPISymetricRoleMaker
from
paddle.fluid.incubate.fleet.base.role_maker
import
MPISymetricRoleMaker
...
...
core/trainers/ctr_modul_trainer.py
浏览文件 @
ba023dfb
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
# limitations under the License.
# limitations under the License.
import
datetime
import
json
import
sys
import
sys
import
time
import
time
import
json
import
datetime
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.base.role_maker
import
GeneralRoleMaker
from
paddle.fluid.incubate.fleet.base.role_maker
import
GeneralRoleMaker
...
...
core/trainers/online_learning_trainer.py
浏览文件 @
ba023dfb
...
@@ -18,9 +18,9 @@ Training use fluid with one node only.
...
@@ -18,9 +18,9 @@ Training use fluid with one node only.
from
__future__
import
print_function
from
__future__
import
print_function
import
datetime
import
os
import
os
import
time
import
time
import
datetime
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler
import
fleet
...
...
core/trainers/single_trainer.py
浏览文件 @
ba023dfb
...
@@ -17,14 +17,14 @@ Training use fluid with one node only.
...
@@ -17,14 +17,14 @@ Training use fluid with one node only.
"""
"""
from
__future__
import
print_function
from
__future__
import
print_function
import
logging
import
time
import
time
import
logging
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.trainers.transpiler_trainer
import
TranspileTrainer
from
paddlerec.core.trainers.transpiler_trainer
import
TranspileTrainer
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
import
numpy
as
np
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(message)s"
)
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(message)s"
)
logger
=
logging
.
getLogger
(
"fluid"
)
logger
=
logging
.
getLogger
(
"fluid"
)
...
...
core/trainers/tdm_cluster_trainer.py
浏览文件 @
ba023dfb
...
@@ -17,7 +17,9 @@ Training use fluid with one node only.
...
@@ -17,7 +17,9 @@ Training use fluid with one node only.
"""
"""
from
__future__
import
print_function
from
__future__
import
print_function
import
logging
import
logging
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler
import
fleet
...
...
core/trainers/tdm_single_trainer.py
浏览文件 @
ba023dfb
...
@@ -18,11 +18,12 @@ Training use fluid with one node only.
...
@@ -18,11 +18,12 @@ Training use fluid with one node only.
from
__future__
import
print_function
from
__future__
import
print_function
import
logging
import
logging
import
paddle.fluid
as
fluid
import
numpy
as
np
import
paddle.fluid
as
fluid
from
paddlerec.core.trainers.single_trainer
import
SingleTrainer
from
paddlerec.core.trainers.single_trainer
import
SingleTrainer
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
import
numpy
as
np
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(message)s"
)
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(message)s"
)
logger
=
logging
.
getLogger
(
"fluid"
)
logger
=
logging
.
getLogger
(
"fluid"
)
...
...
core/utils/dataset.py
浏览文件 @
ba023dfb
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
import
abc
import
abc
import
time
import
datetime
import
datetime
import
time
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
...
...
core/utils/dataset_instance.py
浏览文件 @
ba023dfb
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
import
sys
import
sys
...
...
core/utils/envs.py
浏览文件 @
ba023dfb
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
from
contextlib
import
closing
import
copy
import
copy
import
sy
s
import
o
s
import
socket
import
socket
from
contextlib
import
closing
import
sys
global_envs
=
{}
global_envs
=
{}
...
...
core/utils/fs.py
浏览文件 @
ba023dfb
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
# limitations under the License.
# limitations under the License.
import
os
import
os
from
paddle.fluid.incubate.fleet.utils.hdfs
import
HDFSClient
from
paddle.fluid.incubate.fleet.utils.hdfs
import
HDFSClient
...
...
core/utils/util.py
浏览文件 @
ba023dfb
...
@@ -12,11 +12,12 @@
...
@@ -12,11 +12,12 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
datetime
import
os
import
os
import
time
import
time
import
datetime
from
paddle
import
fluid
from
paddle
import
fluid
from
paddlerec.core.utils
import
fs
as
fs
from
paddlerec.core.utils
import
fs
as
fs
...
...
models/contentunderstanding/classification/model.py
浏览文件 @
ba023dfb
...
@@ -12,11 +12,10 @@
...
@@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
paddle.fluid
as
fluid
from
paddlerec.core.model
import
Model
as
ModelBase
from
paddlerec.core.model
import
Model
as
ModelBase
import
paddle.fluid
as
fluid
class
Model
(
ModelBase
):
class
Model
(
ModelBase
):
def
__init__
(
self
,
config
):
def
__init__
(
self
,
config
):
...
...
models/contentunderstanding/classification/reader.py
浏览文件 @
ba023dfb
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
import
sys
import
sys
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
pass
pass
...
...
models/contentunderstanding/tagspace/model.py
浏览文件 @
ba023dfb
...
@@ -12,13 +12,14 @@
...
@@ -12,13 +12,14 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
paddlerec.core.model
import
Model
as
ModelBase
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.layers.nn
as
nn
import
paddle.fluid.layers.nn
as
nn
import
paddle.fluid.layers.tensor
as
tensor
import
paddle.fluid.layers.tensor
as
tensor
import
paddle.fluid.layers.control_flow
as
cf
import
paddle.fluid.layers.control_flow
as
cf
from
paddlerec.core.model
import
Model
as
ModelBase
class
Model
(
ModelBase
):
class
Model
(
ModelBase
):
def
__init__
(
self
,
config
):
def
__init__
(
self
,
config
):
ModelBase
.
__init__
(
self
,
config
)
ModelBase
.
__init__
(
self
,
config
)
...
...
models/contentunderstanding/tagspace/reader.py
浏览文件 @
ba023dfb
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
import
sys
import
sys
import
numpy
as
np
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
...
...
models/match/dssm/synthetic_reader.py
浏览文件 @
ba023dfb
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
...
...
models/multitask/esmm/esmm_infer_reader.py
浏览文件 @
ba023dfb
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
from
collections
import
defaultdict
from
collections
import
defaultdict
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
class
EvaluateReader
(
Reader
):
class
EvaluateReader
(
Reader
):
...
...
models/multitask/esmm/esmm_reader.py
浏览文件 @
ba023dfb
...
@@ -11,12 +11,12 @@
...
@@ -11,12 +11,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
from
collections
import
defaultdict
from
collections
import
defaultdict
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
...
...
models/multitask/esmm/model.py
浏览文件 @
ba023dfb
...
@@ -12,12 +12,11 @@
...
@@ -12,12 +12,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
math
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
from
paddlerec.core.model
import
Model
as
ModelBase
from
paddlerec.core.model
import
Model
as
ModelBase
import
numpy
as
np
class
Model
(
ModelBase
):
class
Model
(
ModelBase
):
...
...
models/multitask/mmoe/census_infer_reader.py
浏览文件 @
ba023dfb
...
@@ -11,11 +11,10 @@
...
@@ -11,11 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
import
numpy
as
np
class
EvaluateReader
(
Reader
):
class
EvaluateReader
(
Reader
):
...
...
models/multitask/mmoe/census_reader.py
浏览文件 @
ba023dfb
...
@@ -11,11 +11,10 @@
...
@@ -11,11 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
import
numpy
as
np
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
...
...
models/multitask/mmoe/model.py
浏览文件 @
ba023dfb
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
math
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
models/multitask/share-bottom/census_infer_reader.py
浏览文件 @
ba023dfb
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
...
...
models/rank/criteo_reader.py
浏览文件 @
ba023dfb
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
...
...
models/rank/dcn/criteo_reader.py
浏览文件 @
ba023dfb
...
@@ -11,16 +11,20 @@
...
@@ -11,16 +11,20 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
import
math
import
math
import
os
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
try
:
try
:
import
cPickle
as
pickle
import
cPickle
as
pickle
except
ImportError
:
except
ImportError
:
import
pickle
import
pickle
import
os
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
...
...
models/rank/dcn/model.py
浏览文件 @
ba023dfb
...
@@ -12,11 +12,13 @@
...
@@ -12,11 +12,13 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
collections
import
OrderedDict
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
from
paddlerec.core.model
import
Model
as
ModelBase
from
paddlerec.core.model
import
Model
as
ModelBase
from
collections
import
OrderedDict
class
Model
(
ModelBase
):
class
Model
(
ModelBase
):
def
__init__
(
self
,
config
):
def
__init__
(
self
,
config
):
...
...
models/rank/deepfm/criteo_reader.py
浏览文件 @
ba023dfb
...
@@ -11,15 +11,18 @@
...
@@ -11,15 +11,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
try
:
try
:
import
cPickle
as
pickle
import
cPickle
as
pickle
except
ImportError
:
except
ImportError
:
import
pickle
import
pickle
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
self
.
cont_min_
=
[
0
,
-
3
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
]
self
.
cont_min_
=
[
0
,
-
3
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
]
...
...
models/rank/deepfm/model.py
浏览文件 @
ba023dfb
...
@@ -12,9 +12,10 @@
...
@@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
paddle.fluid
as
fluid
import
math
import
math
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
from
paddlerec.core.model
import
Model
as
ModelBase
from
paddlerec.core.model
import
Model
as
ModelBase
...
...
models/rank/din/reader.py
浏览文件 @
ba023dfb
...
@@ -13,16 +13,20 @@
...
@@ -13,16 +13,20 @@
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
import
numpy
as
np
import
os
import
os
import
random
import
random
try
:
try
:
import
cPickle
as
pickle
import
cPickle
as
pickle
except
ImportError
:
except
ImportError
:
import
pickle
import
pickle
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
self
.
train_data_path
=
envs
.
get_global_env
(
"train_data_path"
,
None
,
"train.reader"
)
self
.
train_data_path
=
envs
.
get_global_env
(
"train_data_path"
,
None
,
"train.reader"
)
...
...
models/rank/dnn/model.py
浏览文件 @
ba023dfb
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
# limitations under the License.
# limitations under the License.
import
math
import
math
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
models/rank/wide_deep/model.py
浏览文件 @
ba023dfb
...
@@ -12,9 +12,10 @@
...
@@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
paddle.fluid
as
fluid
import
math
import
math
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
from
paddlerec.core.model
import
Model
as
ModelBase
from
paddlerec.core.model
import
Model
as
ModelBase
...
...
models/rank/wide_deep/reader.py
浏览文件 @
ba023dfb
...
@@ -11,14 +11,17 @@
...
@@ -11,14 +11,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
try
:
try
:
import
cPickle
as
pickle
import
cPickle
as
pickle
except
ImportError
:
except
ImportError
:
import
pickle
import
pickle
from
paddlerec.core.reader
import
Reader
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
pass
pass
...
...
models/rank/xdeepfm/criteo_reader.py
浏览文件 @
ba023dfb
...
@@ -11,14 +11,17 @@
...
@@ -11,14 +11,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
try
:
try
:
import
cPickle
as
pickle
import
cPickle
as
pickle
except
ImportError
:
except
ImportError
:
import
pickle
import
pickle
from
paddlerec.core.reader
import
Reader
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
pass
pass
...
...
models/recall/gnn/evaluate_reader.py
浏览文件 @
ba023dfb
...
@@ -12,9 +12,11 @@
...
@@ -12,9 +12,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
copy
import
copy
import
random
import
random
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
models/recall/gnn/model.py
浏览文件 @
ba023dfb
...
@@ -12,8 +12,9 @@
...
@@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
math
import
math
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
...
...
models/recall/gnn/reader.py
浏览文件 @
ba023dfb
...
@@ -12,9 +12,11 @@
...
@@ -12,9 +12,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
copy
import
copy
import
random
import
random
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
models/recall/gru4rec/rsc15_infer_reader.py
浏览文件 @
ba023dfb
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
...
...
models/recall/gru4rec/rsc15_reader.py
浏览文件 @
ba023dfb
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
...
...
models/recall/ssr/model.py
浏览文件 @
ba023dfb
...
@@ -13,12 +13,11 @@
...
@@ -13,12 +13,11 @@
# limitations under the License.
# limitations under the License.
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddlerec.core.utils
import
envs
from
paddlerec.core.model
import
Model
as
ModelBase
import
paddle.fluid.layers.tensor
as
tensor
import
paddle.fluid.layers.tensor
as
tensor
import
paddle.fluid.layers.control_flow
as
cf
import
paddle.fluid.layers.control_flow
as
cf
from
paddlerec.core.utils
import
envs
from
paddlerec.core.model
import
Model
as
ModelBase
class
BowEncoder
(
object
):
class
BowEncoder
(
object
):
...
...
models/recall/ssr/ssr_infer_reader.py
浏览文件 @
ba023dfb
...
@@ -11,11 +11,14 @@
...
@@ -11,11 +11,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
import
numpy
as
np
class
EvaluateReader
(
Reader
):
class
EvaluateReader
(
Reader
):
...
...
models/recall/ssr/ssr_reader.py
浏览文件 @
ba023dfb
...
@@ -11,11 +11,14 @@
...
@@ -11,11 +11,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
paddlerec.core.reader
import
Reader
import
random
import
random
from
paddlerec.core.reader
import
Reader
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
def
init
(
self
):
def
init
(
self
):
...
...
models/recall/word2vec/model.py
浏览文件 @
ba023dfb
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
math
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
...
...
models/recall/word2vec/preprocess.py
浏览文件 @
ba023dfb
...
@@ -13,13 +13,18 @@
...
@@ -13,13 +13,18 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
io
import
math
import
os
import
os
import
random
import
random
import
re
import
re
import
six
import
six
import
argparse
import
argparse
import
io
import
math
prog
=
re
.
compile
(
"[^a-z ]"
,
flags
=
0
)
prog
=
re
.
compile
(
"[^a-z ]"
,
flags
=
0
)
...
...
models/recall/word2vec/w2v_evaluate_reader.py
浏览文件 @
ba023dfb
...
@@ -11,8 +11,11 @@
...
@@ -11,8 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
io
import
io
import
six
import
six
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
models/recall/word2vec/w2v_reader.py
浏览文件 @
ba023dfb
...
@@ -11,8 +11,11 @@
...
@@ -11,8 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
io
import
io
import
numpy
as
np
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.reader
import
Reader
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
...
...
models/treebased/tdm/model.py
浏览文件 @
ba023dfb
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
"""
"""
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
math
from
paddlerec.core.utils
import
envs
from
paddlerec.core.utils
import
envs
from
paddlerec.core.model
import
Model
as
ModelBase
from
paddlerec.core.model
import
Model
as
ModelBase
...
...
run.py
浏览文件 @
ba023dfb
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
argparse
import
os
import
os
import
subprocess
import
subprocess
import
tempfile
import
argparse
import
tempfile
import
yaml
import
yaml
from
paddlerec.core.factory
import
TrainerFactory
from
paddlerec.core.factory
import
TrainerFactory
...
...
setup.py
浏览文件 @
ba023dfb
...
@@ -15,10 +15,13 @@
...
@@ -15,10 +15,13 @@
"""
"""
setup for paddle-rec.
setup for paddle-rec.
"""
"""
import
os
import
os
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
import
tempfile
import
shutil
import
shutil
import
tempfile
requires
=
[
requires
=
[
"paddlepaddle == 1.7.2"
,
"paddlepaddle == 1.7.2"
,
...
...
tools/tools.py
浏览文件 @
ba023dfb
...
@@ -12,15 +12,16 @@
...
@@ -12,15 +12,16 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
functools
import
os
import
os
import
time
import
platform
import
sys
import
shutil
import
shutil
import
time
import
requests
import
requests
import
sys
import
tarfile
import
tarfile
import
zipfile
import
zipfile
import
platform
import
functools
lasttime
=
time
.
time
()
lasttime
=
time
.
time
()
FLUSH_INTERVAL
=
0.1
FLUSH_INTERVAL
=
0.1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录