phurwicz / hover

:speedboat: Label data at scale. Fun and precision included.
https://phurwicz.github.io/hover
MIT License
323 stars 19 forks source link

Rework rule-based labeling function mechanism #21

Closed phurwicz closed 2 years ago

phurwicz commented 2 years ago

We need to address the interactivity of rules, i.e. the ability to create them dynamically without significant explorer overhead.

Below let's list some options in increasing order of flexibility(?) and decreasing order of feasibility.

Option 1: (most feasible) in-Jupyter-only solution

Give a reference (of the list of rules) to the crosscheck recipe, which has a callback that looks up the reference and runs latest rules. Because this is in Jupyter, python kernel and coding area for the rules are easily available.

Option N: (most flexible) in-any-server solution

Use some widgets to provide the mechanism of adding/removing rules. This will require a text input, a toggle list of current rules, and a remove button. The tricky part will be dynamically turning the text input safely into rules and keeping track of them.

phurwicz commented 2 years ago

Option 1 is fulfilled by https://github.com/phurwicz/hover/commit/9e642a557b41691514ec72429a51c162de6dcc8b