XLearning icon indicating copy to clipboard operation
XLearning copied to clipboard

跑TensorFlow Demo时,worker训练完成,但是worker就是不退出,一直在卡着。

Open sirius3013 opened this issue 7 years ago • 6 comments

请教一下: Xlearning 1.1 版本,跑 TensorFlow的demo,日志中显示所有的work都已经训练完毕了,但是只有task_index = 0 的container状态更新为success,其他container一直在running,日志中没有任何输出?

另外,问一下 ,无论worker-num,设置多少个,都是在一台机器上起的吗?

sirius3013 avatar Aug 30 '18 10:08 sirius3013

建议看下xlearning contianer的jstack在做什么操作,比如是否在做保存模型到hdfs的事情。 第二个问题,如果指定多个worker,调度系统会寻找有空闲资源的机器来运行,不一定是在一台节点上。

liyuance avatar Aug 31 '18 02:08 liyuance

@liyuance 第一个问题,我这边也遇到过类似的,个别节点success,个别节点处于running状态,但我这边只是某个epoch完成,并不是所有训练已完成,感觉是hang住了,不是必现,在google和咨询其他小伙伴后了解到tf hang住的情况是有概率发生的,比如一些io操作会导致,不知道你这边是否有遇到过这种情况,如果有的话一般如何处理?

Cuixixin avatar Aug 31 '18 02:08 Cuixixin

+1. Worker 1 of tf example always hung on tensorflow 1.12

lshmouse avatar Feb 01 '19 03:02 lshmouse

应该是tf实现的bug, 主要是: demo.py 没有正常退出。

work     106165  6.7  0.2 10195036 280148 ?     Sl   11:43   1:01 python demo.py --data_path=./data --save_path=./model --log_dir=./eventLog --training_epochs=10
$ pstack 106165
Thread 1 (process 106165):
#0  0x00007fc25bc8f1c9 in fts_open () from /lib64/libc.so.6
#1  0x00007fff701b3290 in ?? ()
#2  0x00007fc217cc94f1 in ?? ()
#3  0x00007fff701b3210 in ?? ()
#4  0x00007fc25bf5d760 in ?? () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

lshmouse avatar Feb 01 '19 03:02 lshmouse

I upload PR to fix this issue. Please help to review: https://github.com/Qihoo360/XLearning/pull/62, THX~

lshmouse avatar Feb 01 '19 08:02 lshmouse

我也遇到同样的坑,找到了如下解决办法,worker 和 ps 建立通信,亲测有效: https://zjj2wry.github.io/tensorflow/dist/

dawn2034 avatar Aug 30 '20 08:08 dawn2034