finetuner.client.client module#
- class finetuner.client.client.FinetunerV1Client[source]#
Bases:
finetuner.client.base._BaseClient
The Finetuner v1 API client.
- create_experiment(name, description='')[source]#
Create a new experiment.
- Parameters
name (
str
) – The name of the experiment.description (
Optional
[str
]) – Optional description of the experiment.
- Return type
dict
- Returns
Created experiment.
- get_experiment(name)[source]#
Get an experiment by its name.
- Parameters
name (
str
) – The name of the experiment.- Return type
dict
- Returns
Requested experiment.
- list_experiments()[source]#
List all available experiments.
- Return type
List
[dict
]- Returns
List of all experiments.
- delete_experiment(name)[source]#
Delete an experiment given its name.
- Parameters
name (
str
) – The name of the experiment.- Return type
dict
- Returns
Experiment to be deleted.
- delete_experiments()[source]#
Delete all experiments.
- Return type
List
[dict
]- Returns
Experiments to be deleted.
- get_run(experiment_name, run_name)[source]#
Get a run by its name and experiment.
- Parameters
experiment_name (
str
) – The name of the experiment.run_name (
str
) – The name of the run.
- Return type
dict
- Returns
Requested run.
- list_runs(experiment_name=None)[source]#
List all created runs inside a given experiment.
If no experiment is specified, list runs for all available experiments. :type experiment_name:
Optional
[str
] :param experiment_name: The name of the experiment. :rtype:List
[dict
] :return: List of all runs.
- delete_run(experiment_name, run_name)[source]#
Delete a run by its name and experiment.
- Parameters
experiment_name (
str
) – The name of the experiment.run_name (
str
) – The name of the run.
- Return type
dict
- Returns
Deleted run.
- delete_runs(experiment_name)[source]#
Delete all runs inside a given experiment.
- Parameters
experiment_name (
str
) – The name of the experiment.- Return type
List
[dict
]- Returns
List of all deleted runs.
- get_run_status(experiment_name, run_name)[source]#
Get a run status by its name and experiment.
- Parameters
experiment_name (
str
) – The name of the experiment.run_name (
str
) – The name of the run.
- Return type
dict
- Returns
Run status.
- get_run_logs(experiment_name, run_name)[source]#
Get a run logs by its name and experiment.
- Parameters
experiment_name (
str
) – The name of the experiment.run_name (
str
) – The name of the run.
- Return type
str
- Returns
Run logs.
- create_run(experiment_name, run_name, run_config, device, cpus, gpus)[source]#
Create a run inside a given experiment.
For optional parameters please visit our documentation (link). :type experiment_name:
str
:param experiment_name: The name of the experiment. :type run_name:str
:param run_name: The name of the run. :type run_config:dict
:param run_config: The run configuration. :type device:str
:param device: The device to use, either cpu or gpu. :type cpus:int
:param cpus: The number of CPUs to use. :type gpus:int
:param gpus: The number of GPUs to use. :rtype:dict
:return: Created run.