genai.tune.tune_service module#

class genai.tune.tune_service.TuneService[source]#

Bases: BaseService[BaseServiceConfig, BaseServiceServices]

create(*, model_id, name, task_id, training_file_ids, tuning_type, validation_file_ids=None, parameters=None)[source]#
Raises:
Parameters:
  • model_id (str) –

  • name (str) –

  • task_id (str) –

  • training_file_ids (list[str]) –

  • tuning_type (str | Enum) –

  • validation_file_ids (list[str] | None) –

  • parameters (dict | TuneParameters | None) –

Return type:

TuneCreateResponse

create_from_file(*, name, file_id)[source]#
Raises:
Parameters:
  • name (str) –

  • file_id (str) –

Return type:

TuneFromFileCreateResponse

delete(id)[source]#
Raises:
Parameters:

id (str) –

Return type:

None

list(*, limit=None, offset=None, status=None, search=None)[source]#
Raises:
Parameters:
  • limit (int | None) –

  • offset (int | None) –

  • status (TuneStatus | None) –

  • search (str | None) –

Return type:

TuneRetrieveResponse

read(*, id, type)[source]#

Download tune assets.

Raises:
Parameters:
Return type:

bytes

retrieve(id)[source]#
Raises:
Parameters:

id (str) –

Return type:

TuneIdRetrieveResponse

types()[source]#
Raises:
Return type:

TuningTypeRetrieveResponse