mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-24 17:12:29 +00:00
21a5a3f201
* Fixed Options for extra_params in UI * Enhanced meta-programming for models * Plugins can be imported from a python file if they're named `senpy_<whatever>.py>` (no need for `.senpy` anymore!) * Add docstings and tests to most plugins * Read plugin description from the docstring * Refactor code to get rid of unnecessary `.senpy`s * Load models, plugins and utils into the main namespace (see __init__.py) * Enhanced plugin development/experience with utils (easy_test, easy_serve) * Fix bug in check_template that wouldn't check objects * Make model defaults a private variable * Add option to list loaded plugins in CLI * Update docs |
||
---|---|---|
.. | ||
async_plugin.py | ||
basic_plugin.py | ||
basic.py | ||
configurable_plugin.py | ||
dummy_plugin.py | ||
dummy_required_plugin.py | ||
mynoop.py | ||
mynoop.senpy | ||
parameterized_plugin.py | ||
README.md | ||
sleep_plugin.py |
This is a collection of plugins that exemplify certain aspects of plugin development with senpy. In ascending order of complexity, there are:
- Basic: a very basic analysis that does sentiment analysis based on emojis.
- Configurable: a version of
basic
with a configurable map of emojis for each sentiment. - Parameterized: like
basic_info
, but users set the map in each query (viaextra_parameters
). - mynoop: shows how to add a definition file with external requirements for a plugin. Doing this with a python-only module would require moving all imports of the requirements to their functions, which is considered bad practice.
- Async: a barebones example of training a plugin and analyzing data in parallel.
All of the plugins in this folder include a set of test cases and they are periodically tested with the latest version of senpy.
Additioanlly, for an example of stand-alone plugin that can be tested and deployed with docker, take a look at: lab.cluster.gsi.dit.upm.es/senpy/plugin-example bbm