Mais conteúdo relacionado
数式を使わないJubatus入門 分散処理編
- 15. 設定(.json)の適用
15
Zookeeper(Manager)
IP: 172.31.7.70
$ sudo /usr/share/zookeeper/bin/zkServer.sh start
$ jubaconfig -c write -f ja_test.json -t classifier -n nico -z 172.31.7.70:2181
1. Zookeeper起動(zkServer.sh)
• http://zookeeper.apache.org/
• http://jubat.us/ja/tutorial_distributed.html
2. 設定(.json)の適用
• -t オプションにサーバの種類(classifier)
• -n オプションに識別文字列(nico)
• -z オプションにManagerのIPアドレス
→ja_test.jsonについては「数式を使わないJubatus入門」を参
照
http://www.slideshare.net/KenjiAiko/jubatus-22389573
- 16. プロキシ&サーバ起動
16
$ jubaclassifier --zookeeper 172.31.7.70:2181 -n nico
Server
$ jubaclassifier_proxy --zookeeper 172.31.7.70:2181
$ jubactl -z 172.31.7.70:2181 -s classifier -t classifier -c status -n nico
active jubaproxy members:
172.31.7.68_9199
172.31.7.72_9199
active jubavisor members:
active nico members:
172.31.7.69_9199
172.31.7.71_9199
on Zookeeper(Manager) IP: 172.31.7.70
←プロキシとして二台起動していることを確認
←サーバとして二台起動していることを確認
(※)--interval_secオプションでMIXする間隔を秒単位で指
定可
Proxy
- 17. サーバログ
17
...
secs, 8 bytes (serialized data) has been put.
I0913 19:47:31.217651 2370 linear_mixer.cpp:213] .... 23th mix done.
I0913 19:48:03.240432 2370 linear_mixer.cpp:207] starting mix:
I0913 19:48:03.244204 2370 linear_mixer.cpp:264] mixed with 2 servers in 0.003718
secs, 8 bytes (serialized data) has been put.
I0913 19:48:03.244361 2370 linear_mixer.cpp:213] .... 24th mix done.
I0913 19:48:19.254685 2370 linear_mixer.cpp:207] starting mix:
I0913 19:48:19.258323 2370 linear_mixer.cpp:264] mixed with 2 servers in 0.003466
secs, 8 bytes (serialized data) has been put.
I0913 19:48:19.258445 2370 linear_mixer.cpp:213] .... 25th mix done.
I0913 19:48:35.267849 2370 linear_mixer.cpp:207] starting mix:
I0913 19:48:35.276492 2370 linear_mixer.cpp:264] mixed with 2 servers in 0.008466
secs, 8 bytes (serialized data) has been put.
I0913 19:48:35.276619 2370 linear_mixer.cpp:213] .... 26th mix done.
I0913 19:49:07.294831 2370 linear_mixer.cpp:207] starting mix:
I0913 19:49:07.302772 2370 linear_mixer.cpp:264] mixed with 2 servers in 0.007763
secs, 8 bytes (serialized data) has been put.
I0913 19:49:07.302896 2370 linear_mixer.cpp:213] .... 27th mix done.
こんな感じで表示されたらOK!
- 21. 21
$ python ja_test.py samplelog/m2
('', 0)
$ python ja_test.py samplelog/m2
('Mayoi', 0.07325346022844315)
$ python ja_test.py samplelog/m2
('Mayoi', 0.07325346022844315)
$ python ja_test.py samplelog/m2
('', 0)
$ python ja_test.py samplelog/m2
('Mayoi', 0.03662673011422157)
$ python ja_test.py samplelog/m2
('Mayoi', 0.03662673011422157)
$ python ja_test.py samplelog/m2
('Mayoi', 0.03662673011422157)
$ python ja_test.py samplelog/m2
('Mayoi', 0.03662673011422157)
学習&評価の流れ(4/4)
ここでMIXが行われた
アクセスするサーバ(2台)
により
評価毎に結果が異なる
評価結果が同じになる
(平均がとられた?)
(※)--interval_secオプションでMIXする間隔を秒単位で指
定可
MIX前後の評価プログラム実行ログ