Skip to content

warn when add_encoders is set but fit_from_dataset() is called#3134

Closed
DresdenGman wants to merge 1 commit into
unit8co:masterfrom
DresdenGman:feat/fit-from-dataset-encoder-warning
Closed

warn when add_encoders is set but fit_from_dataset() is called#3134
DresdenGman wants to merge 1 commit into
unit8co:masterfrom
DresdenGman:feat/fit-from-dataset-encoder-warning

Conversation

@DresdenGman

Copy link
Copy Markdown

Fixes the silent behavior described in #3006.

When a model is created with add_encoders and fit_from_dataset() is called instead of fit(), the encoders are quietly ignored with no indication that encoded covariates won't be included in training.

Added a logger.warning that fires when self.add_encoders is set, and a note in the docstring so it's visible in the API docs too. No behavior changes beyond the new warning.

Closes #3006

@DresdenGman DresdenGman requested a review from dennisbader as a code owner June 18, 2026 21:38
@dennisbader

Copy link
Copy Markdown
Collaborator

@DresdenGman not sure what you were committing, but the diffs look fishy. Also, we're already working on this in #3086. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Improve handling & documentation of encoders and categorical static covariates in .fit_from_dataset()

2 participants