automl / DeepCAVE

An interactive framework to visualize and analyze your AutoML process in real-time.
https://automl.github.io/DeepCAVE/main/
Apache License 2.0
68 stars 11 forks source link

`type` object is not subscriptable #26

Closed eddiebergman closed 3 weeks ago

eddiebergman commented 2 years ago

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

eddiebergman commented 2 years ago

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.

eddiebergman commented 2 years ago

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.

renesass commented 2 years ago

I often used the walrus operator. Since deepcave depends on nothing, we should just drop python 3.7 here.

eddiebergman commented 2 years ago

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

sarah-segel commented 3 weeks ago

Closing as there are several packges (e.g. numpy) where the used versions are not compatible with pyhton 3.8.