dssg / triage

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

test predictions table doesn't allow predictions of multiple matrices for the same model id #921

Closed KasunAmare closed 1 year ago

KasunAmare commented 1 year ago

Currently the primary key of the predictions table is (model_id, entity_id, as_of_date). If we wanted to use the same model for generating predictions for a different matrix (e.g., with a different test_label_timespan), we can't write those predictions to the table.

Since we are persisting the matrix_uuid and the label_timespan in the table, might be good to add both (or just matrix_uuid) to the primary_key

KasunAmare commented 1 year ago

Thought this through more, and the current functionality is correct. Sorry. Closing!