BentoML artifact framework for simpletransformers
Project description
simplexfmrartifact
BentoML artifact framework for simpletransformers.
Installation:
pip install simplexfmrartifact
Usage example (decorate service):
from simplexfmrartifact.simpletransformers import SimpleTransformersModelArtifact
@artifacts([SimpleTransformersModelArtifact('tm_train3_roberta_l_weigh')])
class MyBentoService(BentoService):
Usage example (package model):
svc = MyBentoService()
metadata = {
"classpackage": "simpletransformers.classification",
"classname": "ClassificationModel",
"opts": {
"use_cuda": true,
"num_labels": 2,
"args": {
"use_multiprocessing": false,
"silent": true,
"eval_batch_size": 10,
"fp16": false
}
}
}
svc.pack(model_name, model_path, metadata)
Alternatively, during training:
svc.pack({'model': my_trained_model, 'model_opts': metadata})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file simplexfmrartifact-0.0.13.tar.gz
.
File metadata
- Download URL: simplexfmrartifact-0.0.13.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4411474820a058f8c2be4139eb2b0d855d9e43c2e17d3561242a2cd5da6cee5 |
|
MD5 | a87637537f40a927be48a3f42f2eb5a0 |
|
BLAKE2b-256 | 993b5768cb04d6030e46b0817588061d4f694367960a86b570201e012c8dbf6a |
File details
Details for the file simplexfmrartifact-0.0.13-py3-none-any.whl
.
File metadata
- Download URL: simplexfmrartifact-0.0.13-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e06809e9f05074df8e3b3f7fba04c4d85850f5e8707c0e97dc5746c15910a91 |
|
MD5 | 479ed04c1a952f0f8638ac72a62bcae8 |
|
BLAKE2b-256 | 1e5f90ce7f0d1355222f6d426c111491035aec2bc3e24a39007c84da0843f95d |