You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A large number of xskillscore methods use xarray's apply_ufunc with dask="parallelized" for dask array support. A preferred option if the wrapped function natively supports dask arrays is to use dask="allowed". See here for details.
This issues list all current methods within xskillscore that use apply_ufunc and tries to summarise for each method how much work is involved in enabling dask="allowed".
xskillscore.contingency
gerrity_score : already dask="allowed"
xskillscore.deterministic
linslope : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
pearson_r : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
pearson_r_p_value : requires slight refactor to how masked nans are reset here since dask doesn't seem to be able to take the length of a empty array
effective_sample_size : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
pearson_r_eff_p_value : requires slight refactor to how masked nans are reset here since dask doesn't seem to be able to take the length of a empty array
spearman_r : need to wrap bottleneck.nanrankdata with dask.map_blocks or equivalent, although I don't know if this is any better than using dask="parallelized"
spearman_r_p_value : as above
spearman_r_eff_p_value : as above
r2 : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
me : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
rmse : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
mse : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
mae : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
median_absolute_error : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
mape : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
smape : all numpy functions used can ingest and return dask arrays so can simply switch dask="parallelized" for dask="allowed"
xskillscore.probabilistic
crps_gaussian : this is a wrapper on properscoring which expects numpy arrays (and actually triggers compute with dask="allowed"). Getting dask="allowed" working properly would require a full refactor of properscoring
crps_quadrature : this is a wrapper on properscoring which expects numpy arrays (and actually triggers compute with dask="allowed"). Getting dask="allowed" working properly would require a full refactor of properscoring
crps_ensemble : this is a wrapper on properscoring which expects numpy arrays (and actually triggers compute with dask="allowed"). Getting dask="allowed" working properly would require a full refactor of properscoring
brier_score : this is a wrapper on properscoring which expects numpy arrays (and actually triggers compute with dask="allowed"). Getting dask="allowed" working properly would require a full refactor of properscoring
threshold_brier_score : this is a wrapper on properscoring which expects numpy arrays (and actually triggers compute with dask="allowed"). Getting dask="allowed" working properly would require a full refactor of properscoring
rank_histogram : need to wrap bottleneck.nanrankdata with dask.map_blocks or equivalent, although I don't know if this is any better than using dask="parallelized"
reliability : already dask="allowed"
xskillscore.resampling
resample_iterations_idx : use dask moveaxis when dask array. This would be easily handled with duck array ops - see below.
The text was updated successfully, but these errors were encountered:
As a general note, I'd suggest that we implement in xskillscore something like xarray's duck_array_ops module. This would make some of the suggestions above very easy to implement/read and replace, for example, the _get_numpy_funcs function in xskillscore.deterministic. I'll try to open a PR for this when I next find some time.
I should also point out that even for those functions that ostensibly can just be switched to dask="allowed", I think @ahuang11 encountered some issues when the forecasts, observations and weights are not all dask or all numpy arrays. Details here. We'll need to resolve these issues with the first PR.
A large number of xskillscore methods use xarray's
apply_ufunc
withdask="parallelized"
for dask array support. A preferred option if the wrapped function natively supports dask arrays is to usedask="allowed"
. See here for details.This issues list all current methods within xskillscore that use
apply_ufunc
and tries to summarise for each method how much work is involved in enablingdask="allowed"
.xskillscore.contingency
dask="allowed"
xskillscore.deterministic
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
dask="parallelized"
fordask="allowed"
xskillscore.probabilistic
dask="allowed"
). Gettingdask="allowed"
working properly would require a full refactor of properscoringdask="allowed"
). Gettingdask="allowed"
working properly would require a full refactor of properscoringdask="allowed"
). Gettingdask="allowed"
working properly would require a full refactor of properscoringdask="allowed"
). Gettingdask="allowed"
working properly would require a full refactor of properscoringdask="allowed"
). Gettingdask="allowed"
working properly would require a full refactor of properscoringdask="parallelized"
dask="allowed"
xskillscore.resampling
moveaxis
when dask array. This would be easily handled with duck array ops - see below.The text was updated successfully, but these errors were encountered: