Skeleton Plugin
Plugin skeleton V1
Flow handle job
- Step 1: Register worker with backend (by env BACKEND_ENDPOINT) with some information (JOB_QUEUE, PLUGIN_CODE, PLUGIN_NAME, PLUGIN_DESCRIPTION, VERSION_CODE)
- Step 2: Connect to Redis, Elastic search (via env REDIS_HOST, REDIS_PORT, ELASTICSEARCH_URL)
- Step 3: Listen redis queue job (JOB_QUEUE)
- Step 4: Handle job
Note: Using file rq_push_job.py for testing push job
Custom an plugin
- Step 1: Inheritance class PluginSkeleton and overwrite function preload for load model if need (in sample_plugin.py).
- Step 2: Custom function handle_job() inside file sample_plugin.py (keep input parameters)
Check list migrate skeleton plugin
- News footprint handle job function: handle_job(doc_index, doc_id, input_data=None, depended_jobs=None)
- Get input data from depended jod: input_data = SamplePlugin.get_depended_jobs_output(current_job, input_data, depended_jobs)
- Input data have new structure, so need to change the way to parse data from input data
{
"plugin_code":{
"data": {},
"version_code": {}
},
"plugin_code":{
"data": {},
"version_code": {}
},
...
}
-
Change in func push result. Now doc_index come before doc_id and need to input version code: PluginSkeleton.push_result(doc_index, doc_id, output, KeywordPlugin.VERSION_CODE)
-
output parameter in push_result func is just content in "data" field
-
"return" in an plugin now need to using this function: plugin_skeleton.PluginSkeleton.get_output_result(output, KeywordPlugin.VERSION_CODE)
-
In docker-compose.yml file need include DEPENDED_PLUGIN_CODE envs (e.g. 'asr,speech_cluster'). It's list of depended plugin code, separate with a comma
-
build lib
python setup.py sdist bdist_wheel
twine upload dist/*
Metadata
Release files for vais-plug 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vais-plug-0.2.7.tar.gz | 7.8 kB | Without provenance | Details for vais-plug-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vais_plug-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for vais_plug-0.2.7-py3-none-any.whl |
Total release size: 17.4 kB
Release files / vais-plug-0.2.7.tar.gz
| Download URL | vais-plug-0.2.7.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c78a942551e9c283b47c8094d9e023c50feead8dc037930f86f73c000f1fed19
|
|
BLAKE2b-256 checksum How to use checksums |
14f63144f8cfd1b2f020c5b20e5eb8e8f8dceab1d5cb2c86057f4d16b23f8b9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.13
|
Release files / vais_plug-0.2.7-py3-none-any.whl
| Download URL | vais_plug-0.2.7-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8efa28beb378937eb03017b5ec39d38801fd105e3851aff80cc0cd5b990f5f50
|
|
BLAKE2b-256 checksum How to use checksums |
abf80fd9f1416988f1b7f1f029a9ffd3660e067acca17bc8591af800f8b5c5a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.13
|
Security for vais-plug 0.2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.