Closed wes-lewis closed 1 year ago
I tried to match the decorators and syntax of the MAGIC methods, to include log/sqrt + norm/reverse-norm for ALRA. There may be some bugs for me to work through!
Seems to be dealing with a recursion depth issue I hadn't seen before. Re-running, and taking a look to see if I notice any obvious changing of data types or processing compared to the previous version.
Is happening in the log normalized, regular norm-order instance... which was previously merged. So something I changed probably broke this.
Current issue:
Traceback (most recent call last): File "/tmp/tmps3gbejjx/test_method.py", line 31, in <module> test_method(*('denoising', 'alra_log', 'openproblems-r-extras'), **{}) File "/tmp/tmps3gbejjx/test_method.py", line 12, in test_method adata = method(adata, test=True) File "/__w/SingleCellOpenProblems/SingleCellOpenProblems/openproblems/tools/decorators.py", line 88, in apply_method adata = func(adata, *args, **kwargs) File "/__w/SingleCellOpenProblems/SingleCellOpenProblems/openproblems/tasks/denoising/methods/alra.py", line 103, in alra_log return _alra(adata, normtype="log", reverse_norm_order=False, test=False) File "/__w/SingleCellOpenProblems/SingleCellOpenProblems/openproblems/tasks/denoising/methods/alra.py", line 60, in _alra Y = _alra(adata) File "/__w/SingleCellOpenProblems/SingleCellOpenProblems/openproblems/tasks/denoising/methods/alra.py", line 60, in _alra Y = _alra(adata) File "/__w/SingleCellOpenProblems/SingleCellOpenProblems/openproblems/tasks/denoising/methods/alra.py", line 60, in _alra Y = _alra(adata) [Previous line repeated 963 more times] File "/__w/SingleCellOpenProblems/SingleCellOpenProblems/openproblems/tasks/denoising/methods/alra.py", line 48, in _alra adata.obsm["train"], libsize = scprep.normalize.library_size_normalize( File "/usr/local/lib/python3.8/site-packages/scprep/normalize.py", line 80, in library_size_normalize rescale, libsize = _get_scaled_libsize(data, rescale, calc_libsize) File "/usr/local/lib/python3.8/site-packages/scprep/normalize.py", line 14, in _get_scaled_libsize libsize = measure.library_size(data) File "/usr/local/lib/python3.8/site-packages/scprep/measure.py", line 23, in library_size library_size = utils.matrix_sum(data, axis=1) File "/usr/local/lib/python3.8/site-packages/scprep/utils.py", line 448, in matrix_sum sums = sum_fn(data, axis=axis) File "<__array_function__ internals>", line 180, in sum File "/usr/local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 2298, in sum return _wrapreduction(a, np.add, 'sum', axis, dtype, out, keepdims=keepdims, File "/usr/local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 84, in _wrapreduction return reduction(axis=axis, out=out, **passkwargs) File "/usr/local/lib/python3.8/site-packages/scipy/sparse/_compressed.py", line 611, in sum major_index, value = self._minor_reduce(np.add) File "/usr/local/lib/python3.8/site-packages/scipy/sparse/_compressed.py", line 645, in _minor_reduce major_index = np.flatnonzero(np.diff(self.indptr)) File "<__array_function__ internals>", line 180, in flatnonzero File "/usr/local/lib/python3.8/site-packages/numpy/core/numeric.py", line 669, in flatnonzero return np.nonzero(np.ravel(a))[0] File "<__array_function__ internals>", line 180, in nonzero File "/usr/local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 1[95](https://github.com/wes-lewis/SingleCellOpenProblems/actions/runs/4218354914/jobs/7322918626#step:13:96)8, in nonzero return _wrapfunc(a, 'nonzero') File "/usr/local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 52, in _wrapfunc bound = getattr(obj, method, None) RecursionError: maximum recursion depth exceeded while calling a Python object
Base: 95.59% // Head: 95.53% // Decreases project coverage by -0.06%
:warning:
Coverage data is based on head (
f7beb44
) compared to base (db800b7
). Patch coverage: 90.62% of modified lines in pull request are covered.:exclamation: Current head f7beb44 differs from pull request most recent head 15122b2. Consider uploading reports for the commit 15122b2 to get more accurate results
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Submission type
Testing
Submission guidelines
PR review checklist
This PR will be evaluated on the basis of the following checks: