Skip to main content

T2R2: train, test, record, repeat: incremental environment for AI model training

Project description

T2R2: Train, test, record, repeat - incremental environment for testing AI models

Open in Dev Containers

Description

TODO


Quick start


Basic training loop

TODO


Implement your own selector

We give you an opportunity to use your own selectors.

  1. Prepare a class you want to use - it should inherit from Selector class from t2r2.selector. Implement its select method.
  2. 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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

t2r2-0.0.1-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file t2r2-0.0.1.tar.gz.

File metadata

  • Download URL: t2r2-0.0.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for t2r2-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0974a1f1dcd8f9bf2ba45497f8eb88dd77b7c553d24d56618260ab19f07ce1bb
MD5 781f0de63d644af62c9d677a8c71b26d
BLAKE2b-256 2bb0bbcaf8eae8869a9fce291916aa1d2b770abc3e54e48e716da615e3698ce2

See more details on using hashes here.

File details

Details for the file t2r2-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: t2r2-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for t2r2-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6da080ff4a8d324c83ff740341ddc1539560dd1c59d8b3c28c1f16796c2f6f1
MD5 7ca371605b46b37b38863790c0ecba61
BLAKE2b-256 38dc32f6e0d099d078dc30ee9107a9a69563831b6bceb82c117a198d72e6419c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page