IndexError: Unknown indexer Ellipsis of type <class 'ellipsis'>
Closed this issue · 1 comments
The program reports an error when I try to run the coed from tutorial
train, test = model.train_test_split(data)
or
tuner.fit(data)
Both the error messages show
Traceback (most recent call last):
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3505, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 11, in
tuner.fit(data)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/mira/topic_model/hyperparameter_optim/trainer.py", line 620, in fit
train, test = cache.cache_data(overwrite=True)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/mira/topic_model/base.py", line 250, in cache_data
train, test = self.model.train_test_split(
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/mira/topic_model/base.py", line 494, in train_test_split
return train_test_split(adata,
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/utils/_param_validation.py", line 213, in wrapper
return func(*args, **kwargs)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/model_selection/_split.py", line 2683, in train_test_split
return list(
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/model_selection/_split.py", line 2685, in
(_safe_indexing(a, train), _safe_indexing(a, test)) for a in arrays
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/utils/init.py", line 386, in _safe_indexing
return _array_indexing(X, indices, indices_dtype, axis=axis)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/utils/init.py", line 196, in _array_indexing
return array[key, ...] if axis == 0 else array[:, key]
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/anndata.py", line 1177, in getitem
oidx, vidx = self._normalize_indices(index)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/anndata.py", line 1158, in _normalize_indices
return _normalize_indices(index, self.obs_names, self.var_names)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/index.py", line 36, in _normalize_indices
ax1 = _normalize_index(ax1, names1)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/index.py", line 116, in _normalize_index
raise IndexError(f"Unknown indexer {indexer!r} of type {type(indexer)}")
IndexError: Unknown indexer Ellipsis of type <class 'ellipsis'>
train, test = model.train_test_split(data)
Traceback (most recent call last):
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3505, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
train, test = model.train_test_split(data)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/mira/topic_model/base.py", line 494, in train_test_split
return train_test_split(adata,
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/utils/_param_validation.py", line 213, in wrapper
return func(*args, **kwargs)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/model_selection/_split.py", line 2683, in train_test_split
return list(
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/model_selection/_split.py", line 2685, in
(_safe_indexing(a, train), _safe_indexing(a, test)) for a in arrays
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/utils/init.py", line 386, in _safe_indexing
return _array_indexing(X, indices, indices_dtype, axis=axis)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/sklearn/utils/init.py", line 196, in _array_indexing
return array[key, ...] if axis == 0 else array[:, key]
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/anndata.py", line 1177, in getitem
oidx, vidx = self._normalize_indices(index)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/anndata.py", line 1158, in _normalize_indices
return _normalize_indices(index, self.obs_names, self.var_names)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/index.py", line 36, in _normalize_indices
ax1 = _normalize_index(ax1, names1)
File "/home/zeng/software/anaconda3/envs/mira/lib/python3.9/site-packages/anndata/_core/index.py", line 116, in _normalize_index
raise IndexError(f"Unknown indexer {indexer!r} of type {type(indexer)}")
IndexError: Unknown indexer Ellipsis of type <class 'ellipsis'>
I am wondering if anyone has any idea about this error.
Hi, I saw another issue which reported this bug, and have found the issue. Anndata is no longer interoperable with scikit-learn's model selection API. A fix should be available early this week!