-
Notifications
You must be signed in to change notification settings - Fork 72
Description
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().