本文書では, Jubatus のノードがクラッシュしたり追加されたりしたときに, 各アルゴリズムが ANALYZE および UPDATE の処理を続けられるかどうかについて述べる.
概観
jubatus/jubatus#448 における変更内容をまとめる。
大雑把には以下の変更を行った。
| import maf | |
| def configure(conf): pass | |
| def build(exp): | |
| exp(target='a', rule='date >> ${TGT}') | |
| exp(source='a', target='b', rule='cp ${SRC} ${TGT}') |
| 1582 2016-09-02 04:29:18 not commented gwtnb not assigned | |
| 1580 2016-09-01 00:50:57 2016-09-01 08:04:40 motootom bkvogel | |
| 1578 2016-08-31 15:20:16 2016-09-01 02:35:12 unnonouno not assigned | |
| 1570 2016-08-30 03:12:58 not commented gwtnb not assigned | |
| 1556 2016-08-26 14:23:08 2016-09-01 14:46:38 takagi delta2323 | |
| 1553 2016-08-24 16:55:14 2016-08-25 08:05:08 unnonouno not assigned | |
| 1551 2016-08-24 14:48:08 2016-09-02 05:31:01 okuta not assigned | |
| 1543 2016-08-22 13:20:26 2016-08-24 02:26:46 boeddeker not assigned | |
| 1541 2016-08-22 08:34:24 2016-08-29 07:17:07 unnonouno delta2323 | |
| 1537 2016-08-21 15:33:46 2016-08-25 06:28:49 fukatani delta2323 |
| import numpy as np | |
| class InvertedIndex(object): | |
| def __init__(self, x): | |
| self.J = np.argsort(x) | |
| D = np.ediff1d(x[self.J], to_begin=1, to_end=1) | |
| self.I = np.repeat(np.arange(len(D)), D) | |
| def __getitem__(self, k): |
In this gist, I list up the possible changes on existing APIs for Chainer v2. It also includes some ideas of adding new APIs related to existing ones. Note that this is not a complete list of future changes for v2.
__len__ should return the length of the first axis.This is a guideline to give the standard way of implementing a new-style function in Chainer. Different developers can align the coding style by writing implementations based on this document.
A new-style function implementation consists of at least two elements:
an implementation of FunctionNode and a user interface function.