Tuning
- Tuning settings types
- class yandex_ai_studio_sdk._types.tuning.tuning_types.BaseTuningType
- class yandex_ai_studio_sdk._types.tuning.tuning_types.TuningTypeLora
- class yandex_ai_studio_sdk._types.tuning.tuning_types.TuningTypePromptTune
- class yandex_ai_studio_sdk._types.tuning.schedulers.BaseScheduler
- class yandex_ai_studio_sdk._types.tuning.schedulers.SchedulerLinear
- class yandex_ai_studio_sdk._types.tuning.schedulers.SchedulerConstant
- class yandex_ai_studio_sdk._types.tuning.schedulers.SchedulerCosine
- class yandex_ai_studio_sdk._types.tuning.optimizers.BaseOptimizer
- class yandex_ai_studio_sdk._types.tuning.optimizers.OptimizerAdamw
- Tuning task operation
- class yandex_ai_studio_sdk._tuning.tuning_task.AsyncTuningTask
- class yandex_ai_studio_sdk._tuning.tuning_task.TuningTask
- class yandex_ai_studio_sdk._tuning.tuning_task.TuningTaskInfo
- class yandex_ai_studio_sdk._tuning.tuning_task.TuningTaskStatus
- class yandex_ai_studio_sdk._tuning.tuning_task.TuningTaskStatusEnum
Tuning settings types
class yandex_ai_studio_sdk._types.tuning.tuning_types.BaseTuningType
class yandex_ai_studio_sdk._types.tuning.tuning_types.TuningTypeLora
TuningTypeLora(rank: ‘int | None’ = None, alpha: ‘float | None’ = None, initialization: ‘str | None’ = None, type: ‘str | None’ = None)
initialization: str
class yandex_ai_studio_sdk._types.tuning.tuning_types.TuningTypePromptTune
TuningTypePromptTune(virtual_tokens: ‘int | None’ = None)
virtual_tokens: int
class yandex_ai_studio_sdk._types.tuning.schedulers.BaseScheduler
BaseScheduler(warmup_ratio: ‘float | None’ = None)
warmup_ratio: float
class yandex_ai_studio_sdk._types.tuning.schedulers.SchedulerLinear
SchedulerLinear(warmup_ratio: ‘float | None’ = None, min_lr: ‘float | None’ = None)
warmup_ratio: float
class yandex_ai_studio_sdk._types.tuning.schedulers.SchedulerConstant
SchedulerConstant(warmup_ratio: ‘float | None’ = None)
warmup_ratio: float
class yandex_ai_studio_sdk._types.tuning.schedulers.SchedulerCosine
SchedulerCosine(warmup_ratio: ‘float | None’ = None, min_lr: ‘float | None’ = None)
warmup_ratio: float
class yandex_ai_studio_sdk._types.tuning.optimizers.BaseOptimizer
BaseOptimizer()
class yandex_ai_studio_sdk._types.tuning.optimizers.OptimizerAdamw
OptimizerAdamw(beta1: ‘float | None’ = None, beta2: ‘float | None’ = None, eps: ‘float | None’ = None, weight_decay: ‘float | None’ = None)
weight_decay: float
Tuning task operation
class yandex_ai_studio_sdk._tuning.tuning_task.AsyncTuningTask
Tuning task class that provides an Operation interface for tracking the tuning task and obtaining results.
async get_task_info(*, timeout=60)
Retrieves tuning task information from the Yandex AI Studio service.
Makes an async gRPC call to the TuningService to get detailed information about the current tuning task. The method first obtains the task ID and then fetches the full task information.
|
Parameters |
timeout (float |
|
Return type |
TuningTaskInfo | None |
async get_metrics_url(*, timeout=60)
Fetches metrics URL for the current tuning task.
Returns None if the task has not yet generated metrics or if metrics are not available.
|
Parameters |
timeout (float |
|
Return type |
str |
async cancel(*, timeout=60)
|
Parameters |
timeout (float |
|
Return type |
None |
async get_result(*, timeout=60)
|
Parameters |
timeout (float |
|
Return type |
async get_status(*, timeout=60)
|
Parameters |
timeout (float |
|
Return type |
property id
Get fine-tuning task identifier.
async wait(*, timeout=60, poll_timeout=None, poll_interval=None)
|
Parameters |
|
|
Return type |
class yandex_ai_studio_sdk._tuning.tuning_task.TuningTask
Tuning task class that provides an Operation interface for tracking the tuning task and obtaining results.
get_task_info(*, timeout=60)
Retrieves tuning task information from the Yandex AI Studio service.
Makes an async gRPC call to the TuningService to get detailed information about the current tuning task. The method first obtains the task ID and then fetches the full task information.
|
Parameters |
timeout (float |
|
Return type |
TuningTaskInfo | None |
get_metrics_url(*, timeout=60)
Fetches metrics URL for the current tuning task.
Returns None if the task has not yet generated metrics or if metrics are not available.
|
Parameters |
timeout (float |
|
Return type |
str |
cancel(*, timeout=60)
|
Parameters |
timeout (float |
|
Return type |
None |
get_result(*, timeout=60)
|
Parameters |
timeout (float |
|
Return type |
get_status(*, timeout=60)
|
Parameters |
timeout (float |
|
Return type |
property id
Get fine-tuning task identifier.
wait(*, timeout=60, poll_timeout=None, poll_interval=None)
|
Parameters |
|
|
Return type |
class yandex_ai_studio_sdk._tuning.tuning_task.TuningTaskInfo
Contains metadata and status information about a model tuning task.
This class represents the state and configuration of a fine-tuning operation for machine learning models. It tracks the task lifecycle through status updates and provides references to related resources.
task_id: str
Unique task identifier
operation_id: str
Associated operation ID
status: TuningTaskStatusEnum
Current task status
folder_id: str
Yandex Cloud folder ID
created_by: str
Creator identity
created_at: datetime
Creation timestamp
started_at: datetime | None
Start timestamp (None if not started)
finished_at: datetime | None
Completion timestamp (None if not finished)
source_model_uri: str
URI of source model
URI of tuned model (None if not completed)
id: str
class yandex_ai_studio_sdk._tuning.tuning_task.TuningTaskStatus
Status of a tuning task operation.
Extends OperationStatus with tuning-specific status information.
property is_failed: bool
Check if operation execution failed.
property is_finished: bool
Check if operation execution finished.
property is_running: bool
Check if operation execution is still in progress.
property is_succeeded: bool
Check if operation execution completed successfully.
property status_name: str
Get operation execution status name.
done: bool
error: OperationErrorInfo | None
class yandex_ai_studio_sdk._tuning.tuning_task.TuningTaskStatusEnum
Enum representing possible statuses of a tuning task.
STATUS_UNSPECIFIED = 0
Status not specified
CREATED = 1
Task created but not started
PENDING = 2
Task pending execution
IN_PROGRESS = 3
Task execution in progress
COMPLETED = 4
Task completed successfully
FAILED = 5
Task failed