Skip to content

Commit

Permalink
fix(base): remove bug-causing BaseEstimator check
Browse files Browse the repository at this point in the history
  • Loading branch information
f-aguzzi committed Jun 26, 2024
1 parent 799111b commit 4e9d3b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/chemfusekit/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import numpy as np
import joblib

from sklearn.base import BaseEstimator

from ._utils import GraphMode


Expand Down Expand Up @@ -108,7 +106,7 @@ class BaseActionClass(ABC):
def __init__(self, settings: BaseSettings, data: BaseDataModel):
self.settings = settings
self.data = data
self.model: BaseEstimator | None = None
self.model = None

@abstractmethod
def train(self):
Expand Down Expand Up @@ -137,8 +135,6 @@ def import_model(self, import_path: str):
model = joblib.load(import_path)
except Exception as exc:
raise ImportError("The file you tried importing is not a valid Python object!") from exc
if not isinstance(model, BaseEstimator):
raise ImportError("The file you tried importing is not a sklearn model!")
self.model = model

def export_model(self, export_path: str):
Expand Down

0 comments on commit 4e9d3b9

Please sign in to comment.