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}'
},
'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
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
cltrier_prosem-0.1.2.tar.gz
(1.6 MB
view details)
Built Distribution
File details
Details for the file cltrier_prosem-0.1.2.tar.gz
.
File metadata
- Download URL: cltrier_prosem-0.1.2.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da1941299c5ebbe2a5c56f6f6e6d82b222db22daa1da16c25561a0343426403 |
|
MD5 | 551f6fc801264650471612c4c09eac27 |
|
BLAKE2b-256 | 04dcc9c9971e11e959219087f8531173a66f15ebaf9b3a4fc0d4adaa4b15d05f |
Provenance
File details
Details for the file cltrier_prosem-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: cltrier_prosem-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c96fef6546f2a6285a81117ab70e91aa86db00bf4a648f9a4312223d66fbf4b |
|
MD5 | e8e178b5990f455adda99a5e1d9f53bc |
|
BLAKE2b-256 | adec45bcc6d2e0c7130f17980e41cd2be9486c8914e39163406b823cde031185 |