bert-multitask-as-service
A serving service for bert-multitask-learning
Install
pip install bert-multitask-server
pip install bert-multitask-client
Getting Started
-
Train and export model.
A typical trained checkpoint dir looks like below.
bert_serving_ckpt/ ├── *_label_encoder.pkl ├── bert_config.json ├── export_model ├── params.json └── vocab.txt
-
Start server using CLI
bert-multitask-serving-start -model_dir ~/CWS_NER_POS_ckpt/ -num_worker=4 -problem "CWS|NER|POS"
-
Use Client to Get Prediction
from bert_serving.client import BertClient bc = BertClient() bc.encode(['我爱北京天安门'])
Bert多任务学习服务
一个部署Bert多任务学习的服务
安装
pip install bert-multitask-server
pip install bert-multitask-client
开始使用
-
训练模型并导出模型.
导出后的模型目录应该有以下文件
bert_serving_ckpt/ ├── *_label_encoder.pkl ├── bert_config.json ├── export_model ├── params.json └── vocab.txt
-
用CLI启动服务
bert-multitask-serving-start -model_dir models/ -num_worker=4 -problem "fake_problem"
-
用客户端获取预测结果
from bert_serving.client import BertClient bc = BertClient() bc.encode(['我爱北京天安门'])
Metadata
Release files for bert-multitask-server 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bert_multitask_server-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for bert_multitask_server-0.1.2-py3-none-any.whl |
Release files / bert_multitask_server-0.1.2-py3-none-any.whl
| Download URL | bert_multitask_server-0.1.2-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d60bcb1a44a507f5b9b1e1f834eb7af36be111940807705c72d0ec19b9ea03e
|
|
BLAKE2b-256 checksum How to use checksums |
6c52fc72966d16bc84b87db50e1b0702bdda1bbe2d1168decb321e51f35bf49b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.5
|
Security for bert-multitask-server 0.1.2
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.