Skip to content

ModelBuilder and _generate_and_preprocess_model_data() #596

@wmiller

Description

@wmiller

I'm writing a non-trival model using ModelBuilder. This model needs to do some data processing, and I've added that code in the _generate_and_preprocess_model_data(), and a call to _generate_and_preprocess_model_data() at the top of build_model() as the documentation and unit tests suggest. I'm having issues with my data processing because _generate_and_preprocess_model_data() is called twice when fitting, once (explicitly) in build_model() and once implicitly as part of fit(). If I remove my explicit call to _generate_and_preprocess_model_data() in build_model(), fitting works, but loading a saved model doesn't, because self.X and self.y aren't valid. Adding the explicit call to _generate_and_preprocess_model_data() fixes loading and saving, but breaks my data processing.

The model used in the ModelBuilder unit tests doesn't do any data transformations. X and y are just cached in _generate_and_preprocess_model_data().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions