Python SDK for Transformer Lab
Project description
Transformer Lab SDK
The Transformer Lab Python SDK provides a way for ML scripts to integrate with Transformer Lab.
Install
pip install transformerlab
Usage
from lab import lab
# Initialize with experiment ID
lab.init("my-experiment")
lab.log("Job initiated")
config_artifact_path = lab.save_artifact(<config_file>, "training_config.json")
lab.log(f"Saved training config: {config_artifact_path}")
lab.update_progress(1)
...
lab.update_progress(99)
model_path = lab.save_model(<training_output_dir>, name="trained_model")
lab.log("Saved model file to {model_path}")
lab.finish("Training completed successfully")
Sample scripts can be found at https://github.com/transformerlab/transformerlab-app/tree/main/lab-sdk/scripts/examples
Development
The code for this can be found in the lab-sdk directory of
https://github.com/transformerlab/transformerlab-app
To develop locally in editable mode and run automated tests:
cd lab-sdk
uv venv
uv pip install -e .
uv run pytest # Run tests
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file transformerlab-0.0.58.tar.gz.
File metadata
- Download URL: transformerlab-0.0.58.tar.gz
- Upload date:
- Size: 73.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec957e830fdfde826ce52a7b2f65d3e5de2093c123f3a51e1e670f88c6c777ee
|
|
| MD5 |
6117d00f2323e1da59bd00f39b029b38
|
|
| BLAKE2b-256 |
0553a3445ceb7298e604dec77f2df93853d247b202e5a81068b437c781fe2337
|
File details
Details for the file transformerlab-0.0.58-py3-none-any.whl.
File metadata
- Download URL: transformerlab-0.0.58-py3-none-any.whl
- Upload date:
- Size: 59.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d05ad0eba05160361e225105e57c0f757e7ada885efa09e6e5de8fb48a1a653
|
|
| MD5 |
fd9103aa0965965086c0923a0e41eb0f
|
|
| BLAKE2b-256 |
b9e330d8eb3030aa66f5d7e71a4c98dc10d60ce18aba1957f6e510c16642f571
|