diff --git a/src/dask_histogram/core.py b/src/dask_histogram/core.py index 4f3cec7..64d5f19 100644 --- a/src/dask_histogram/core.py +++ b/src/dask_histogram/core.py @@ -524,7 +524,9 @@ def _get_optimization_function(): # running this optimization even in cases where it's unncessary # because if no AwkwardInputLayers from dask-awkward are # detected then the original graph is returned unchanged. - if dask.config.get("awkward", default=False): + import importlib.metadata + + if importlib.metadata.distribution("dask_awkward"): from dask_awkward.lib.optimize import all_optimizations return all_optimizations