dssg / tyra

Prediction model evaluation
Other
4 stars 1 forks source link

Remove duplication from get_model_groups #55

Open thcrock opened 7 years ago

thcrock commented 7 years ago

This if block: https://github.com/dssg/tyra/blob/master/webapp/query.py#L72

shouldn't be so big. The only thing that changes is the model_comment part, right? We can refactor this out either by dynamically generating that SQL clause, or using SQL logic. (ie "AND ({model_comment} = 'all' or {model_comment} = tbl.model_comment)"

tweddielin commented 7 years ago

yeah you're right.