T2R2: train, test, record, repeat: incremental environment for AI model training
Project description
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
Selector
class fromt2r2.selector
. Implement itsselect
method. - When declarating your own selector - provide
module_path
as 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
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
t2r2-0.0.1.tar.gz
(21.1 kB
view hashes)
Built Distribution
t2r2-0.0.1-py3-none-any.whl
(27.8 kB
view hashes)