glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
740 stars 153 forks source link

Pin numpy-dev to avoid `GlueSerializer` failure on `numpy._ArrayFunctionDispatcher` #2352

Closed dhomeier closed 1 year ago

dhomeier commented 1 year ago

Description

Recent dev jobs such as py310-test-pyqt515-dev-all have become stuck in test_data_viewer.py hanging until CI timed out. Locally I think I could bisect this to numpy/numpy#23020 which has test_save_aggregate_slice halt with a dialog window

Traceback (most recent call last): File "/Users/derek/git/glue/glue/core/application_base.py", line 23, in wrapper return func(*args, **kwargs) File "/Users/derek/git/glue/glue/core/application_base.py", line 121, in save_session state = gs.dumps(indent=2) File "/Users/derek/git/glue/glue/core/state.py", line 421, in dumps result = self.dumpo() File "/Users/derek/git/glue/glue/core/state.py", line 400, in dumpo return self.do_all() File "/Users/derek/git/glue/glue/core/state.py", line 325, in do_all result = [(oid, self.do(obj)) for oid, obj in list(self._objs.items())] File "/Users/derek/git/glue/glue/core/state.py", line 325, in result = [(oid, self.do(obj)) for oid, obj in list(self._objs.items())] File "/Users/derek/git/glue/glue/core/state.py", line 353, in do result = fun(obj, self) File "/Users/derek/git/glue/glue/core/state.py", line 583, in _save_tuple return dict(contents=[context.do(item) for item in state]) File "/Users/derek/git/glue/glue/core/state.py", line 583, in return dict(contents=[context.do(item) for item in state]) File "/Users/derek/git/glue/glue/core/state.py", line 353, in do result = fun(obj, self) File "/Users/derek/git/glue/glue/viewers/image/state.py", line 59, in gluestate function=context.do(self.function)) File "/Users/derek/git/glue/glue/core/state.py", line 351, in do fun, version = self._dispatch(obj) File "/Users/derek/git/glue/glue/core/state.py", line 380, in _dispatch raise GlueSerializeError("Don't know how to serialize" glue.core.state.GlueSerializeError: Don't know how to serialize <function sum at 0x104aa4ed0> of type <class 'numpy._ArrayFunctionDispatcher'>

Running a couple different -dev setups here to investigate further.

dhomeier commented 1 year ago

Pinned numpy-dev now to the last commit prior to wrapping __array_func__; original tests in https://github.com/glue-viz/glue/actions/runs/3991572342 all failing or rather hanging right after TestImageViewer::test_linking_and_enabling.