Skip to main content

Personal Trainer

Personal Trainer is a Python library for easily training models on your own data using open source models.

Personal Trainer is still under development.

Usage

Each type of model is represented by a class in Personal Trainer. For example, one of the simplest models to use is a TextClassifier.

from personal_trainer import TextClassifier

classifier = TextClassifier()

A text classifier takes some text and returns whether it's thing A or thing B. To train the model you first construct a series of examples of text and how it should be classified. You can then pass those examples to the train method of the classifier.

examples = [
        ('oscar meyer', 'hot dog'),
        ('choripan', 'hot dog'),
        ('bratwurst', 'hot dog'),
        ('vienna sausage', 'hot dog'),
        ('sandwich', 'not'),
        ('burger', 'not'),
        ('dumpling', 'not'),
        ('bun', 'not'),
]

classifier.train(examples)

Once you've trained your model you can then use it. For a classifier that means calling the classify method.

res = classifier.classify('taco')
print('res:', res)

If training was successful res should be not. A classifier output can be any string, integer, or Boolean.

To save your model for later use using the save method. This writes the model out to the path that you provide.

classifier.save('hot-dog-or-not.model')

To load the model later, provide the same path when constructing the classifier.

classifier = TextClassifier('hot-dog-or-not.model')

Metadata

Release files for model-personal-trainer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for model-personal-trainer 0.1.0
File Size Uploaded Provenance Actions
model_personal_trainer-0.1.0.tar.gz 4.9 kB Without provenance Details for model_personal_trainer-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for model-personal-trainer 0.1.0
File Interpreter ABI Platform Actions
model_personal_trainer-0.1.0-py3-none-any.whl Python 3 none any Details for model_personal_trainer-0.1.0-py3-none-any.whl

Total release size: 11.0 kB

Release files / model_personal_trainer-0.1.0.tar.gz

Download URL model_personal_trainer-0.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f12fe4cf94811b86aa91f6f89430832752c7a7d83aedadffdbc770c40cfb30dd
BLAKE2b-256 checksum
How to use checksums
e985b789abed341b47c9faf497e3c378e29c0444d14eef6bdec84607dfdfbef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.6 Linux/6.2.6-76060206-generic

Release files / model_personal_trainer-0.1.0-py3-none-any.whl

Download URL model_personal_trainer-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91677cce25ad814fadb71c38cf043916da296ae5f05df5313b27609db96663f4
BLAKE2b-256 checksum
How to use checksums
bff29e19ba7c6d9c097d810d4bba988e98d002a7f9f729e23acf9c7eca0d0ace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.6 Linux/6.2.6-76060206-generic

Security for model-personal-trainer 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page