Skip to content

Commit

Permalink
Remove mention of former compat modules (#1588)
Browse files Browse the repository at this point in the history
* Remove mention of former `compat` modules

* Format test_estimators.py
  • Loading branch information
e10e3 authored Aug 16, 2024
1 parent d606d7b commit b5e6fea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
6 changes: 0 additions & 6 deletions river/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
try:
import sklearn # noqa: F401
except ImportError:
collect_ignore.append("compat/sklearn.py")
collect_ignore.append("compat/test_sklearn.py")

try:
Expand All @@ -14,11 +13,6 @@
collect_ignore.append("stream/iter_sql.py")
collect_ignore.append("stream/test_sql.py")

try:
import torch # noqa: F401
except ImportError:
collect_ignore.append("compat/pytorch.py")

try:
import vaex # noqa: F401
except ImportError:
Expand Down
13 changes: 1 addition & 12 deletions river/test_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import inspect

import pytest
from sklearn import linear_model as sk_linear_model

from river import (
anomaly,
Expand All @@ -24,15 +25,6 @@
preprocessing,
time_series,
)

try:
from river.compat.pytorch import PyTorch2RiverBase

PYTORCH_INSTALLED = True
except ImportError:
PYTORCH_INSTALLED = False
from sklearn import linear_model as sk_linear_model

from river.compat.river_to_sklearn import River2SKLBase
from river.compat.sklearn_to_river import SKL2RiverBase

Expand Down Expand Up @@ -84,9 +76,6 @@ def iter_estimators_which_can_be_tested():
time_series.base.Forecaster,
)

if PYTORCH_INSTALLED:
ignored = (*ignored, PyTorch2RiverBase)

def can_be_tested(estimator):
return not inspect.isabstract(estimator) and not issubclass(estimator, ignored)

Expand Down

0 comments on commit b5e6fea

Please sign in to comment.