DeepCAVE
DeepCAVE copied to clipboard
`type` object is not subscriptable
Will try to add from __future__ import annotations
at the top.
File "/home/skantify/code/DeepCAVE/deepcave/evaluators/epm/random_forest.py", line 345, in RandomForest
def _predict(self, X: np.ndarray) -> tuple[np.ndarray, np.ndarray]:
TypeError: 'type' object is not subscriptable
Python 3.8.5
Turns out it happens in a dependency too so we couldn't fix it there.
File "/home/skantify/code/DeepCAVE/.venv/lib/python3.8/site-packages/pyPDP/surrogate_models/__init__.py", line 39, in SurrogateModel
def predict(self, X: np.ndarray) -> tuple[np.ndarray, np.ndarray]:
The options are to either fix dependancies or to lock requirements to Python>=3.9
where this feature is available.
I see the requirements are hardlocked for some of them, I'm guessing there is a reason for this. If not, I can try get it all working with a Python 3.7 version but I imagine you may already be locked in to Python 3.9 at this point due to using newer features of libraries.
I often used the walrus operator. Since deepcave depends on nothing, we should just drop python 3.7 here.
Whoops, I meant to say 3.8
, not 3.7
. I.e. one of the deps installed, or at least it's current version, is not compatible with 3.8
Closing as there are several packges (e.g. numpy) where the used versions are not compatible with pyhton 3.8.