dssg / triage

General Purpose Risk Modeling and Prediction Toolkit for Policy and Social Good Problems
Other
187 stars 61 forks source link

ModelTrainer: If model metadata is in db, but pickle is not available, and flag is set, update foreign keys #284

Open jesteria opened 6 years ago

jesteria commented 6 years ago

From @thcrock on July 19, 2017 22:18

The current code for this path has a workaround. We should support the replace-and-update use case with a flag, and correctly update foreign keys.

Copied from original issue: dssg/catwalk#3

thcrock commented 6 years ago

Adding some more detail to this (it's a very old issue). The question is: what happens if we delete the pickles from where they are stored but don't touch the metadata in the database? Right now what happens is we retrain each model, replace the metadata for the trained model, but don't update the feature importances. The ModelTrainer should aggressively delete the foreign keys so they are properly replaced.