Skip to content

Commit

Permalink
not sure why dask can't give up optimizing
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma Ai committed Aug 22, 2024
1 parent b404842 commit 083c1c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ odc-dscache>=0.2.3
odc-stac @ git+https://github.com/opendatacube/odc-stac@69bdf64

# odc-stac is in PyPI
odc-stats[ows] @ git+https://github.com/opendatacube/odc-stats@f1f2771
odc-stats[ows] @ git+https://github.com/opendatacube/odc-stats@b404842

# For ML
tflite-runtime
Expand Down
4 changes: 2 additions & 2 deletions odc/stats/plugins/lc_ml_treelite.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ def preprocess_predict_input(self, xx: xr.Dataset):
images += [image]
else:
veg_mask = expr_eval(
"where(a==_v, 1, 0)",
"where((a+0.5>_v)&(a-0.5<_v), 1, 0)",
{"a": image},
name="make_mask",
dtype="float32",
**{"_v": int(self.mask_bands[var])},
**{"_v": self.mask_bands[var]},
)

if veg_mask is None:
Expand Down
2 changes: 1 addition & 1 deletion odc/stats/plugins/lc_treelite_cultivated.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import numpy as np
import xarray as xr
import dask.array as da
import numexpr as ne

from ._registry import register
from .lc_ml_treelite import StatsMLTree, mask_and_predict
import numexpr as ne

NODATA = 255

Expand Down

0 comments on commit 083c1c8

Please sign in to comment.