mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

Is there any completed example on use hdfs with multiple devices

Open SupDataKing opened this issue 10 years ago • 6 comments

I can read hdfs on single machine,but not on distributed ! example, if execute "../../tools/launch.py -n 2 -H hosts python train_mnist.py --data-dir hdfs://hadoop01:8020/mnist/" it will be return error like this==> "CalledProcessError: Command 'ssh -o StrictHostKeyChecking=no 192.168.10.2 'export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib::/opt/mpich/lib::/opt/hadoop-2.6.0/lib/native/:/opt/mpich/lib; export DMLC_ROLE=worker; export DMLC_PS_ROOT_PORT=9092; export DMLC_PS_ROOT_URI=192.168.10.2; export DMLC_NUM_SERVER=2; export DMLC_NUM_WORKER=2; cd /home/hadoop/yewei/mxnet-master/example/image-classification/; python train_mnist.py --data-dir hdfs://hadoop01:8020/yaofei/mnist/'' returned non-zero exit status 1 " "loadFileSystems error: (unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.) hdfsBuilderConnect(forceNewInstance=0, nn=hadoop01:8020, port=0, kerbTicketCachePath=(NULL), userName=(NULL)) error: (unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.) [10:04:11] include/dmlc/logging.h:235: [10:04:11] src/io/hdfs_filesys.cc:95: Failed to load HDFS-configuration:"

Otherwise if I exectue "mxnet/tools/launch.py -n 2 --launcher yarn python train_mnist.py --data-dir hdfs://hadoop01:8020/mnist/" It can only running on single machine with two processes! how to submit on yarn with multiple devices.

SupDataKing avatar Jun 24 '16 06:06 SupDataKing

This looks more like a cluster config issue. Try write a simple script that reads data without using mxnet first and see if it can run

piiswrong avatar Jun 26 '16 20:06 piiswrong

thanks,I solved it! Is there any completed example on distributed yarn! I completed just on ssh!!

SupDataKing avatar Jun 27 '16 01:06 SupDataKing

hi, @SupDataKing you said you have solved it ,so how to submitted a HDFS based job on ssh? I've tried python ${HOME}/mxnet/tools/launch.py -n 2 --launcher ssh -H hosts
python -u train_resnet.py --data-dir hdfs://204.204.30.181:9001/Imagedata/dataset/ --data-type imagenet --depth 18 --batch-size 320 --gpus=0 --num-epoch=70 --kv-store dist_sync
which returns loadFileSystems error: (unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.) hdfsBuilderConnect(forceNewInstance=0, nn=204.204.30.181:9001, port=0, kerbTicketCachePath=(NULL), userName=(NULL)) error: (unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.) [15:21:38] include/dmlc/logging.h:300: [15:21:38] src/io/hdfs_filesys.cc:95: Failed to load HDFS-configuration: As far as i know, the hadoop works fine.

younglou avatar May 02 '17 07:05 younglou

I figure it out by adding hdfs jars to environment variable CLASSPATH. according to http://stackoverflow.com/questions/21064140/hadoop-c-hdfs-test-running-exception

younglou avatar May 03 '17 07:05 younglou

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!

szha avatar Sep 29 '17 23:09 szha

Hi @younglou @SupDataKing I am also wondering how mxnet data iterators could read data (e.g. imagenet) from hdfs. What examples are you running? I can't find train_resnet.py... I'm running https://github.com/apache/incubator-mxnet/blob/master/example/gluon/image_classification.py and seems there's problem reading from hdfs. Thanks so much for your help in advance!

hkvision avatar Dec 17 '19 11:12 hkvision