Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplexfmrartifact-0.0.13.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

simplexfmrartifact-0.0.13-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

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

Hashes for simplexfmrartifact-0.0.13.tar.gz
Algorithm Hash digest
SHA256 a4411474820a058f8c2be4139eb2b0d855d9e43c2e17d3561242a2cd5da6cee5
MD5 a87637537f40a927be48a3f42f2eb5a0
BLAKE2b-256 993b5768cb04d6030e46b0817588061d4f694367960a86b570201e012c8dbf6a

See more details on using hashes here.

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

Hashes for simplexfmrartifact-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1e06809e9f05074df8e3b3f7fba04c4d85850f5e8707c0e97dc5746c15910a91
MD5 479ed04c1a952f0f8638ac72a62bcae8
BLAKE2b-256 1e5f90ce7f0d1355222f6d426c111491035aec2bc3e24a39007c84da0843f95d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page