Skip to content

Commit

Permalink
better art typing
Browse files Browse the repository at this point in the history
  • Loading branch information
simplymathematics committed Aug 13, 2024
1 parent db2c9ed commit 658e987
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions deckard/base/model/sklearn_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def __call__(self, model):
Pipeline,
):
model.model = Pipeline([("model", model.model)])
elif str(type(model)).startswith("art.") and isinstance(model.model, Pipeline):
elif str(type(model)).startswith("art.") and isinstance(
model.model, Pipeline
):
model.model.steps.insert(-2, [stage, model.model])
else:
model.steps.insert(-2, [stage, model])
Expand Down Expand Up @@ -256,4 +258,4 @@ def __call__(self):
model,
"fit",
), f"model must have a fit method. Got type {type(model)}"
return model
return model

0 comments on commit 658e987

Please sign in to comment.