Skip to main content

ToDo!

Project description

CLTrier ProSem

Usage

from cltrier_prosem import Pipeline

# init pipeline object (load model, data, trainer)
pipeline = Pipeline({
    'encoder': {
        'model': 'deepset/gbert-base',  # huggingface model slug 
    },
    'dataset': {
        'path': './path/data',  # path to data directory (containing train/test.parquet)
        'text_column': 'text',  # column containing src text
        'label_column': 'label',  # column containing target label
        'label_classes': ['class_1', 'class_2'],  # list of target classes
    },
    'classifier': {
        'hid_size': 512,  # size of classifier perceptron
        'dropout': 0.2,  # dropout value
    },
    'pooler': {
        'form': 'cls',
        # type of pooling, possible values: 
        # 'cls', 'sent_mean', 'subword_{first|last|mean|min|max}'
        # if subword probing used
        'span_column': 'span'
    },
    'trainer': {
        'num_epochs': 5,  # number of training epochs
        'batch_size': 32,  # batch size in both training and evaluation
        'learning_rate': 1e-3,  # trainer learning rate
        'export_path': './path/output',  # output path for logging and results
    },
})

# call pipeline object (training and evaluation)
pipeline()

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

cltrier_prosem-0.2.0.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

cltrier_prosem-0.2.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file cltrier_prosem-0.2.0.tar.gz.

File metadata

  • Download URL: cltrier_prosem-0.2.0.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for cltrier_prosem-0.2.0.tar.gz
Algorithm Hash digest
SHA256 996bd39ca7334cc7c193f7f32b49791775b076fde131f4d6168513b752d95905
MD5 e425a338ce28a85fdd2472d1085faada
BLAKE2b-256 ecfc99c0d1a3c9011a89859f43ffa066f547725575a34ea4d52d26fa20c8a32a

See more details on using hashes here.

Provenance

File details

Details for the file cltrier_prosem-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cltrier_prosem-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53ddff865bf238603a839ff512813b2d5d5fe2a2014cc9640ae5f794d7b998fc
MD5 2bb34d8cd0d0c27f9bd4e7b5e98baf9a
BLAKE2b-256 da20e0c769095a1d3484d9a5502aedae32772e3ecba7f0d749b1096c8210ef4c

See more details on using hashes here.

Provenance

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