Skip to content

Instantly share code, notes, and snippets.

View rimms's full-sized avatar

IMAMASU Ryohei rimms

View GitHub Profile
@rimms
rimms / 01_summary.rst
Last active December 26, 2015 05:18
ZooKeeper の各ノードが期待する状態ではない時の振る舞い(案)

目的

Jubatus は ZooKeeper 上のリソースを操作するが、そのリソースが期待する状態ではなかった場合の動作について、明確な方針がない。

以下を定義する。

  • ZooKeeper 上のリソースの CRU(D) 操作に関する方針
@rimms
rimms / zknodelist.rst
Last active December 26, 2015 04:49
ZK node list

ZooKeeper上のノード一覧

1 | /jubatus | False | False |
@rimms
rimms / status_engine.rst
Last active December 22, 2015 17:39
機械学習エンジンごとの取得情報

機械学習エンジンごとの取得情報

目的/考え方

  • Jubatus を運用する上で、以下の観点での情報が必要と考える。
    • 学習リクエストが正しく到達したことを確認できる情報
@rimms
rimms / zknodes.rst
Created June 7, 2013 05:27
Jubatus の ZooKeeper ノード一覧
+----------+--------------+----------+----------+--------------+-------------------+-------------------------------------------+
| /jubatus | /config | /type | /name | config の内容が書き込まれる |
+ +--------------+----------+----------+--------------+-------------------+-------------------------------------------+
| | /actors | /type | /name | /config_lock | /rlock_0000000001 | jubaserver 起動時に作成される |
+ + + + + +-------------------+-------------------------------------------+
| | | | | | /wlock_0000000001 | jubaconfig で config 書込み中に作成される |
+ + + + +--------------+-------------------+-------------------------------------------+
| | | | | /nodes | /ip_port | jubaserver の IPアドレス と ポート番号 |
+ + +
@rimms
rimms / gist:5410745
Created April 18, 2013 07:02
hexdump shogun
00000000 6a 75 62 61 74 75 73 01 00 00 00 04 00 03 00 e8 |jubatus.........|
00000010 01 00 00 00 00 00 00 0a 5f 21 13 95 01 ce 51 6f |........_!....Qo|
00000020 8b 03 aa 63 6c 61 73 73 69 66 69 65 72 a4 74 65 |...classifier.te|
00000030 73 74 da 01 ce 7b 0a 20 20 22 6d 65 74 68 6f 64 |st...{. "method|
00000040 22 3a 20 22 41 52 4f 57 22 2c 0a 20 20 22 63 6f |": "AROW",. "co|
00000050 6e 76 65 72 74 65 72 22 3a 20 7b 0a 20 20 20 20 |nverter": {. |
00000060 22 6e 75 6d 5f 66 69 6c 74 65 72 5f 74 79 70 65 |"num_filter_type|
00000070 73 22 3a 20 7b 7d 2c 0a 20 20 20 20 22 6e 75 6d |s": {},. "num|
00000080 5f 66 69 6c 74 65 72 5f 72 75 6c 65 73 22 3a 20 |_filter_rules": |
00000090 5b 5d 2c 0a 20 20 20 20 22 73 74 72 69 6e 67 5f |[],. "string_|
@rimms
rimms / 01_Backup_and_Recovery.rst
Last active December 15, 2015 23:49
Backup and Recovery

Backup and Recovery

Jubatus サーバは、メモリ上で機械学習に関するデータを管理しています。 メモリ上でデータを管理するという性質上、Jubatusサーバプロセスの終了とともに Jubatus 上のデータは失われます。

Jubatus では、予期せぬプロセスの終了や誤ったオペレーションに備え、バックアップとリカバリのための機能を提供しています。

現在、Jubatus では、以下の手段を提供しています。

@rimms
rimms / gist:5218540
Last active December 15, 2015 06:48
Save/Load Ideas

[1] Format of File

Ideas:

  • pfi::data::serialization (currently using)
  • MessagePack
  • Protocol Buffer
  • Thrift
  • Avro
@rimms
rimms / gist:4633358
Last active December 11, 2015 17:18
save/load まとめ

これまでの議論と 進め方 などのまとめ

Jubatus において状態書出/読込機能が必要となるユースケース

save/load という既存機能に関わらず、状態書出/読込機能が必要とされるケースを列挙する。必ずしも、状態書出/読込で実現する必要はない。

  1. 「誤ったデータを学習させた」などのオペレーションミスへの対策
@rimms
rimms / gist:4471857
Last active December 10, 2015 17:59
How to Use Jubatus 0.4.0
standalone mode
===============
$ jubaclassifier -f CONFIGFILE_PATH
CONFIGFILE_PATH is Jubatus's machine learning configuration.
For example, see https://github.com/jubatus/jubatus/tree/develop/src/server/test_input .
A new key "parameter" was added for each algorithm (some algorithm has no parameter).
@rimms
rimms / gist:4326958
Created December 18, 2012 10:32
API Return Values and Types

classifier

  • train ... PENDING
    • type: int -> bool?
    • value: size of data (list of tuple of label and datum) -> true?
  • classify ... OK
    • type: list<list<estimate_result> >
  • get_config ... OK
    • type: string