[ENH] Test and Score: Allow choosing columns#2257
Conversation
788e862 to
87d7037
Compare
Codecov Report
@@ Coverage Diff @@
## master #2257 +/- ##
=========================================
Coverage ? 72.51%
=========================================
Files ? 319
Lines ? 55198
Branches ? 0
=========================================
Hits ? 40025
Misses ? 15173
Partials ? 0 |
|
I like this. It's a good solution to the 'kitchen sink' problem. It is not related to this PR, I get it on the latest master as well, but it seems to be happening in Test&Score and perhaps it can be patched here. Or in another PR... Oh, and it doesn't break anything obvious. |
8221cc7 to
b2f85a8
Compare
| def show_column_chooser(self, pos): | ||
| # pylint doesn't know that self.shown_scores is a set, not a Setting | ||
| # pylint: disable=unsupported-membership-test | ||
| def update(col_name, state): |
There was a problem hiding this comment.
Perhaps misleading since it would imply it is (was) already visible. I changed it to checked.
| return action | ||
|
|
||
| def execmenu(*_): | ||
| self.assertEqual(list(actions), list(all)[1:]) |
There was a problem hiding this comment.
A comment explaining why complication with execmenu is needed would be nice
| class_selection = settings.ContextSetting(TARGET_AVERAGE) | ||
|
|
||
| shown_scores = \ | ||
| settings.Setting({"AUC", "CA", "F1", "Precision", "Recall", |
There was a problem hiding this comment.
Non-primitive settings cannot be stored to workflow in json format resulting in base64 encoded pickled blobs. Not sure if we care, since the widget uses context settings, which also cannot be serialized with json.
There was a problem hiding this comment.
If list can be stored in json and if we care(d) I can replace the set with a list. No big changes in the code, except that conceptually this is a set, not a list.
Can it, do we, should I?
There was a problem hiding this comment.
yes, probably not, no
If this change would "break" json serialization, I would say yes, but since it is already broken, I would say leave it like it is.
b2f85a8 to
3212e3a
Compare
We may want to add more scorers in the future, but we'd like to keep the widget simple. This PR allows the user to choose the columns by right-clicking in the top header.
Includes