Skip to content

Commit

Permalink
TEST: only re-fit the model where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
j-ittner committed Jul 10, 2023
1 parent 921b385 commit e880e6f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/test/facet/test_inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_model_inspection(
assert (
sample.features.notna().all().all()
), "observations must not contain missing values"
model = regressor.fit(X=sample.features, y=sample.target)
model = regressor
regressor_feature_names = set(sample.feature_names)

else:
Expand All @@ -146,10 +146,7 @@ def test_model_inspection(

# noinspection PyTypeChecker
inspector = NativeLearnerInspector(
model=(
# fit the model on the sample
model.fit(X=sample.features, y=sample.target)
),
model=model,
explainer_factory=explainer_factory,
n_jobs=n_jobs,
).fit(sample)
Expand Down

0 comments on commit e880e6f

Please sign in to comment.