Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New BatchSchema class to generate patch selectors and combine into ba…
…tch selectors (#132) In v0.2.0, information about the batch_selectors was stored as a dict in the ._batch_selectors attribute of the BatchGenerator class. This PR introduces BatchSchema which contains all necessary information about the batch selectors. BatchGenerator now creates an instance of BatchSchema, which handles the creation of selectors object. The purpose of BatchGenerator is to create batches (xarray Datasets/DataArrays) from those selector objects. This opens up possibilities including serializing/deserializing the BatchSchema (e.g., BatchSchema.to_json() and BatchSchema.from_json()), caching BatchSchema objects separate from caching batches, and relatedly applying one BatchSchema instance to multiple xarray datasets. Co-authored-by: Anderson Banihirwe <[email protected]> Co-authored-by: Anderson Banihirwe <[email protected]>
- Loading branch information