SpikeInterface / SpikeInterface/spikeinterface
Issue for any stochastic test failures in CI so we can track them
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 847
- Forks
- 280
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 29
Description
This only failed on one OS/one python version. Not sure if this is a problem in generate_sorting_to_inject which can cause some failures. We can leave this issue open to monitor if this problem happens multiple times.
From action: https://github.com/SpikeInterface/spikeinterface/actions/runs/9898102287/job/27344129816?pr=3185
_______________________ test_generate_sorting_to_inject ________________________
def test_generate_sorting_to_inject():
durations = [10.0, 20.0]
sorting = generate_sorting(num_units=10, durations=durations, sampling_frequency=30000, firing_rates=1.0)
> injected_sorting = generate_sorting_to_inject(
sorting, [int(duration * sorting.sampling_frequency) for duration in durations]
)
src/spikeinterface/core/tests/test_generate.py:549:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/spikeinterface/core/generate.py:293: in generate_sorting_to_inject
min_diff = np.min(np.abs(injected_spike_train[:, None] - spike_train[None, :]), axis=1)
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/numpy/core/fromnumeric.py:2953: in min
return _wrapreduction(a, np.minimum, 'min', axis, None, out,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = array([], shape=(0, 0), dtype=int64), ufunc = <ufunc 'minimum'>
method = 'min', axis = 1, dtype = None, out = None
kwargs = {'initial': <no value>, 'keepdims': <no value>, 'where': <no value>}
passkwargs = {}
def _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs):
passkwargs = {k: v for k, v in kwargs.items()
if v is not np._NoValue}
if type(obj) is not mu.ndarray:
try:
reduction = getattr(obj, method)
except AttributeError:
pass
else:
# This branch is needed for reductions like any which don't
# support a dtype.
if dtype is not None:
return reduction(axis=axis, dtype=dtype, out=out, **passkwargs)
else:
return reduction(axis=axis, out=out, **passkwargs)
> return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
E ValueError: zero-size array to reduction operation minimum which has no identity
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/spikeinterface/core/tests/test_generate.py at test_generate_sorting_to_inject and the generate_sorting_to_inject entry point in src/spikeinterface/core/generate.py. Run the named test and review the linked CI failure across its OS and Python-version context. Done means determining whether the failure is reproducible or stochastic and documenting or addressing the cause so the test no longer fails unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100