Skip to content

Commit

Permalink
batch_size as parameter
Browse files Browse the repository at this point in the history
make batch_size a parameter of the feature extractor, to easily set it in the udf
  • Loading branch information
jdries authored Jun 25, 2024
1 parent 98a182d commit de78e28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/worldcereal/openeo/feature_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ def execute(self, inarr: xr.DataArray) -> xr.DataArray:
get_presto_features,
)

batch_size = self._parameters.get("batch_size", 4096)

self.logger.info("Extracting presto features")
features = get_presto_features(
inarr, presto_model_url, self.epsg, batch_size=4096
inarr, presto_model_url, self.epsg, batch_size=batch_size
)
return features

Expand Down

0 comments on commit de78e28

Please sign in to comment.