![]() |
Belle II Software light-2601-hyperion
|


Public Member Functions | |
| __init__ (self, parquet_path, variables, target, batch_size, chunk_size) | |
| __len__ (self) | |
| __getitem__ (self, idx) | |
Public Attributes | |
| variables = variables | |
| List of input variable names. | |
| target = target | |
| Name of target variable. | |
| batch_size = batch_size | |
| Batch size of the model. | |
| pf = pq.ParquetFile(parquet_path) | |
| Parquet metadata. | |
| n_chunks = self.pf.num_row_groups | |
| Number of chunks in the data file. | |
| int | current_chunk_idx = 0 |
| Index of chunk currently in use. | |
| dataset_length | |
| Number of rows in datafile. | |
| chunk_lock = threading.Lock() | |
| Chunklock to avoid race conditions. | |
| bool | chunk_ready = False |
| Flag that indicated weather the new chunk is done loading into memory. | |
| loader_thread = None | |
| Thread that loads new chunk while main thread is training. | |
| chunk_in_use = self.chunk_in_waiting | |
| Chunk currently in use. | |
| max_batches = self.max_batches_next | |
| Number of batches in a chunk. | |
| int | current_batch = 0 |
| Index of current batch in current chunk. | |
| tuple | chunk_in_waiting = (X, y) |
| Next chunk. | |
| max_batches_next = max_batches | |
| Maximum number of batches in this chunk. | |
Protected Member Functions | |
| _load_chunk (self) | |
| _start_async_load (self) | |
| _wait_for_chunk (self) | |
| _get_batch (self, batch_idx) | |
| __init__ | ( | self, | |
| parquet_path, | |||
| variables, | |||
| target, | |||
| batch_size, | |||
| chunk_size ) |
Prepare all variables and prefetch 2 chunks.
Definition at line 23 of file fitter.py.
| __getitem__ | ( | self, | |
| idx ) |
Returns the next batch used in training
Definition at line 73 of file fitter.py.
| __len__ | ( | self | ) |
|
protected |
|
protected |
Load next chunk from datafile and shuffle it
Definition at line 91 of file fitter.py.
|
protected |
Start new thread to load new chunk
Definition at line 115 of file fitter.py.
|
protected |
| chunk_in_use = self.chunk_in_waiting |
| chunk_lock = threading.Lock() |
| bool chunk_ready = False |
| int current_batch = 0 |
| dataset_length |
| loader_thread = None |
| max_batches = self.max_batches_next |
| max_batches_next = max_batches |
| n_chunks = self.pf.num_row_groups |