diff --git a/bridge.pyx b/bridge.pyx index ebaacab..fae5af1 100644 --- a/bridge.pyx +++ b/bridge.pyx @@ -79,6 +79,7 @@ cdef public int get_tokens(WordList* wl, const char *filename): try: words = next(g) except StopIteration: + eprint(f'Text {fnu} depleted, restarting...') tokenizers[fnu] = nn.token_generator(fnu) g = tokenizers[fnu] words = next(g) @@ -118,7 +119,6 @@ cdef public void randidx(int* idx, size_t l, size_t how_much): cdef public object create_network(): try: net = nn.create_cbow_network() - eprint(net) return net except Exception as e: eprint(e) @@ -169,7 +169,7 @@ cdef public void update_weightlist(WeightList* wl, object net): cdef public void combo_weights( WeightList* wl_frank, WeightList* wls, size_t num_weights ): - """Not a one-liner anymore :/""" + """Not a one-liner anymore \_(".)_/""" alpha = 1. / num_weights frank = wrap_weight_list(wl_frank) for w in frank: @@ -188,7 +188,7 @@ cdef tuple cbow_batch(float* batch, size_t bs): cdef list wrap_weight_list(WeightList* wl): - """Thinly wraps a WeightList struct into a NumPy array.""" + """Thinly wraps a WeightList struct into a list of NumPy arrays.""" weights = [] for i in range(wl.n_weights): w_shape = wl.weights[i].shape @@ -231,4 +231,4 @@ def ensure_contiguous(a): def eprint(*args, **kwargs): - return print(*args, flush=True, **kwargs) + return print(*args, flush=True, file=stderr, **kwargs) diff --git a/main.c b/main.c index 498bcac..b5460bc 100644 --- a/main.c +++ b/main.c @@ -415,7 +415,7 @@ void dispatcher() { float delta_t = finish - start; float delta_l = first_loss - crt_loss; INFO_PRINTF( - "Laptop MPI adam consecutive_batch " + "WIKI MPI adam consecutive_batch " "W%lu E%lu BS%lu bpe%lu LPR%d pp%lu," "%f,%f,%f,%f," "%lu,%.0f,%lu\n",