-
Notifications
You must be signed in to change notification settings - Fork 21
Plugins
Snorkel supports configuration via the app/plugins
directory. So far, there are three types of plugins:
To use a plugin, clone it into app/plugins and restart snorkel.
In order to make snorkel more deployable / configurable, its possible to store all your config in a separate git repo. You can clone that repo into app/plugins/snorkel-config and re-use configs across instances, etc.
To enable (or disable) per dataset views, use the snorkel-dataset-config repo and plugins
To add new views, see how snorkel-plugins-demo does it. In order for a new view to work, it has to 1) be cloned into the app/plugins
directory and 2) hooked up in the dataset config (also in app/plugins
) as a custom view.
Views can specify their query type, supported inputs (and even have custom inputs) and have 3 main methods.
-
prepare
- called when receiving the query results -
finalize
- called after all query results returned -
render
- called to render the data into a div
You can look in snorkel's view dir to see how other views are structured.