withsklearn.config_context(assume_finite=True):# reduce validation overhead: will not throw a ValueError if X contains NaN or infinity.pass# do learning/prediction here with reduced validation
withsklearn.config_context(working_memory=128# MB):pass# do chunked work here
The advantage here is that the estimators would already be fit with the previous parameter setting, and with each subsequent call to fit, the model will be starting from the previous parameters, and we're just analyzing if adding new estimators would benefit the model.