dssg/catwalk

New feature importances aren't written when replacing an existing model

shaycrk opened this issue · 3 comments

ModelTrainer._write_model_to_db() returns before processing feature importances if it finds existing metadata for the model in the database (for instance, when trying to re-run a model with replace=True) -- see line 140 of model_trainers.py. As a result, replaced models will be associated with the old, incorrect, feature importances from a previous run.

Relatedly, another side-effect of this behavior is that models that get re-run don't receive an updated run time or batch run time in the database, with the models table reflecting when the model was initially run, not most recently.

if i'm reading this right, you're referring to an existing bug, i think. there is an open PR! #25

Ah, I missed that PR, but looks like that should address this! Are you just waiting on testing/approval to merge it in?

Closing this since we addressed by merging #25