finetuner.experiment module#

class finetuner.experiment.Experiment(client, name, status, created_at, description='')[source]#

Bases: object

Class for an experiment.

Parameters:
  • client (FinetunerV1Client) – Client object for sending api requests.

  • name (str) – Name of the experiment.

  • status (str) – Status of the experiment.

  • created_at (str) – Creation time of the experiment.

  • description (Optional[str]) – Optional description of the experiment.

property name: str#

Get the name of the Experiment.

Return type:

str

property status: str#

Get the status of the Experiment.

Return type:

str

get_run(name)[source]#

Get a Run given a name.

Parameters:

name (str) – Name of the run.

Return type:

Run

Returns:

A Run object.

list_runs(page=50, size=50)[source]#

List all Run.

Parameters:
  • page (int) – The page index.

  • size (int) – The number of runs to retrieve per page.

Return type:

List[Run]

Returns:

A list of Run instance.

..note:: page and size works together. For example, page 1 size 50 gives

the 50 runs in the first page. To get 50-100, set page as 2.

..note:: The maximum number for size per page is 100.

delete_run(name)[source]#

Delete a Run by its name.

Parameters:

name (str) – Name of the run.

delete_runs()[source]#

Delete all Run inside the Experiment.

create_training_run(model, train_data, run_name=None, eval_data=None, csv_options=None, **kwargs)[source]#

Create a Run inside the Experiment with the task of ‘training’.

Return type:

Run

create_synthesis_run(query_data, corpus_data, models, num_relations=10, run_name=None, csv_options=None, **kwargs)[source]#

Create a Run inside the Experiment with the task of ‘generation’ (data synthesis).

Return type:

Run