T2R2: Train, test, record, repeat - incremental environment for testing AI models
Description
TODO
Quick start
Basic training loop
TODO
Implement your own selector
We give you an opportunity to use your own selectors.
- Prepare a class you want to use - it should inherit from
Selectorclass fromt2r2.selector. Implement itsselectmethod. - When declarating your own selector - provide
module_pathas one of the arguments.
Below we present a simple example how to do it.
config.yaml part
selectors:
- name: UserSelector
args:
module_path: ./my_selector.py
my_selector.py code
import pandas as pd
from t2r2.selector import Selector
class UserSelector(Selector):
def select(self, dataset: pd.DataFrame) -> pd.DataFrame:
return dataset[:5]
Curriculum learning
To force specific order in which examples will be passed during training:
training:
curriculum_learning: True
Then you also need to provide the order column in your training data.
Basically, the examples will be sorted according to order column and won't be shuffled.
You can also use the custom selector to dynamically provide the order of your training examples. For example, to pass examples in the order of increasing lenght of text:
class ClSelector(Selector):
def select(self, dataset: pd.DataFrame) -> pd.DataFrame:
dataset["order"] = [len(i) for i in dataset["text"]]
return dataset
Metadata
Release files for t2r2 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| t2r2-0.0.1.tar.gz | 21.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| t2r2-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.9 kB
Release files / t2r2-0.0.1.tar.gz
| Download URL | t2r2-0.0.1.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0974a1f1dcd8f9bf2ba45497f8eb88dd77b7c553d24d56618260ab19f07ce1bb
|
|
BLAKE2b-256 checksum How to use checksums |
2bb0bbcaf8eae8869a9fce291916aa1d2b770abc3e54e48e716da615e3698ce2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / t2r2-0.0.1-py3-none-any.whl
| Download URL | t2r2-0.0.1-py3-none-any.whl |
|---|---|
| Size | 27.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6da080ff4a8d324c83ff740341ddc1539560dd1c59d8b3c28c1f16796c2f6f1
|
|
BLAKE2b-256 checksum How to use checksums |
38dc32f6e0d099d078dc30ee9107a9a69563831b6bceb82c117a198d72e6419c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|