Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

集群是否可以进行predict #599

Closed
333caowei opened this issue Nov 24, 2016 · 4 comments
Closed

集群是否可以进行predict #599

333caowei opened this issue Nov 24, 2016 · 4 comments
Assignees

Comments

@333caowei
Copy link

集群版demo中只有任务提交的例子,单机版的demo提供了predict.sh的demo,但在数据量很大的情况下单机版执行predict.sh会很慢,不知道mpi版本是否可以执行类似demo中的predict.sh的操作呢

@backyes
Copy link
Contributor

backyes commented Nov 24, 2016

predict 过程是一个高度可并行的过程,因此你可以将predict封装为一个mpi任务、一个spark任务,甚至一个特殊的hadoop任务, 例如

一个mpi封装:

mpirun download.sh # download several data
mpirun predict.sh  #do predict 

原理上,就像实现一个多机word count 一样的逻辑。

目前,paddle官方未维护多机predict平台。

@333caowei
Copy link
Author

@backyes 集群训练时候需要将train文件分割,mpi文件粒度并行,请问predict的执行过程是否需要将test文件也进行分割呢

@backyes
Copy link
Contributor

backyes commented Nov 24, 2016

@333caowei
理论上要的。简单理解, predict过程就是一个forward获取output 激活的过程,所以你想要的结果一定是不同样本对应的不同的输出,所以你并行跑的predict的时候,也应该是不同并发任务运行不同的样本数据part,否则就没有意义了。

@backyes backyes closed this as completed Nov 24, 2016
@hphp
Copy link

hphp commented Nov 24, 2016

@333caowei hi, caowei~ 我提供一下我的方法哈,正如backyes所说,prediction的过程应该是可高度并行的,所以大数据量时,我直接在hadoop集群上进行prediction,只需要将相应的依赖(包括库和predict及相应conf)上传即可,非常方便~

zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this issue Sep 25, 2019
* inference_en

* Review
yaozhixin pushed a commit to graphcore/Paddle-fork that referenced this issue Apr 28, 2022
heavengate pushed a commit to heavengate/Paddle that referenced this issue Aug 24, 2022
optimize fast_index_map_helpers C++ compile
AnnaTrainingG pushed a commit to AnnaTrainingG/Paddle that referenced this issue Sep 19, 2022
* Update README_cn.md

* Update README_cn.md

* Update README.md

* Update README_cn.md

* Update README_cn.md

* Update README_cn.md

* Create config_doc.md

* Create apps.md

* Update README_cn.md
lizexu123 pushed a commit to lizexu123/Paddle that referenced this issue Feb 23, 2024
* fix prune doc

* fix prune demo batchsize

* fix lr (PaddlePaddle#593)

* fix lr schedule in prune demo (PaddlePaddle#595)

* fix prune demo batchsize

* fix lr shcedule in prune demo
;

Co-authored-by: wanghaoshuang <[email protected]>

* remove softmax from demo/models (PaddlePaddle#596)

* fix prune demo batchsize

* fix lr shcedule in prune demo
;

* remove softmax from demo/models

Co-authored-by: wanghaoshuang <[email protected]>

* fix prune demo log

Co-authored-by: wanghaoshuang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants