-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix]Solve circular import #151
Conversation
Hmmm still brings up the same problem :-/ |
These fail because they use the released version of dask-awkward |
indeed - I should look at these things after coffee. Otherwise lgtm. |
OK, release is out on pypi and things are importable again. |
Something's gone off with with the tests and optimization. One of the awkward histogram filling tests should be using the optimization function from dask awkward as opposed to dask histogram and now it has stopped doing that. |
I don't understand. This is a new issue? No code changed here... |
Yeah I am not sure, but tests in main are failing. I'll check on my laptop in a bit. |
The tests even passed in your PR so that's rather strange! |
https://github.com/dask-contrib/dask-histogram/actions/runs/10946251458/job/30392316434?pr=152#step:5:138 you seem to be right. I have it locally too, must have been a different commit, though. |
OK, so the case is: dask is no longer auto-importing dask-awkward as before. If you import dask-awkward before running the graph, it is right. |
--- 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 OK? |
Fixes #149
This is a more complex way of solving things, by splitting this into two packages.