worker
birdnet_stm32.data.worker
¶
Per-file loading and preprocessing, run inside the loader's worker processes.
Kept free of TensorFlow on purpose. The worker pool uses the forkserver
start method, whose server preloads only this module, so workers start from a
small single-threaded process instead of a fork of the TensorFlow trainer.
arena_columns(buf, n_cells, layout)
¶
[n_cells, *shape] arrays over buf, one per chunk column, each 64-byte aligned.
layout is a list of (shape, dtype), one per element of the tuples _process_file
returns: sample, label and, with teacher embeddings, the embedding and its valid flag.
Source code in birdnet_stm32/data/worker.py
arena_bytes(n_cells, layout)
¶
Size of the buffer arena_columns lays out.
set_arena(columns)
¶
Point _process_into at columns (the in-process loader's own arena).