Changement de la parallélisation des traitements avec rioxarray - #24
Changement de la parallélisation des traitements avec rioxarray#24cadauxe wants to merge 57 commits into
Conversation
refactor: checking that the outputs with xarray are the same than with np
refactor: checking similarity for timeseries np and xarray
docs: Updating html doc with cli --help output
|
Une option lors du lancement des tests dans la CI a été rajoutée, on peut maintenant accéder au temps que prend chaque test et comparer si tests mettent plus de temps avec rioxarray qu’avec la classe Windowable. Voici les conclusions majeures : |
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
This PR includes generated/runtime artifacts such as __pycache__/*.pyc, .coverage, *.egg-info, METADATA/RECORD/WHEEL, docs/_build, and generated test outputs. These are environment-specific and make the 1,992-file diff non-reproducible. Please remove generated artifacts and keep the source/config/test changes only.
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
Hi, the new valid/nodata accounting is off: all_count = np.count_nonzero(~mask) already counts only unmasked pixels, which is the same population as dataset.count(). That makes nodata always zero and valid essentially 1.0 even when the clipped region contains nodata. Could all_count represent all pixels in the geometry instead?
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
One band-selection regression: both compute_speed() and _interpolate_xarray() use isel(band=slice(0, len(bands))), so the values in bands are ignored. For example, bands=[2, 4] processes the first two bands rather than bands 2 and 4. Could these paths select the requested band coordinates/indices explicitly?
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
Hi, multi-band category stats are collapsed here. roi_statistics is one dict shared across every band, so entries for a given category/stat are overwritten by the next band, and the function always appends a one-element list. Could the per-band dictionaries be kept separate as in the previous return contract?
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
One empty-region regression: the old code returned None statistics when dataset.count() == 0, but that guard is gone. With majority or minority requested, an all-nodata clipped region produces an empty pixel_count and _key_assoc_val() calls max([])/min([]), raising instead of returning an empty statistic. Could the zero-valid-pixel case be restored?
Fait référence à l'issue #12 .