Domain
class yandex_cloud_ml_sdk._models.text_classifiers.function.AsyncTextClassifiers
A class for text classifiers.
It provides a common interface for text classification models and constructs the model URI based on the provided model name and version.
__call__(model_name, *, model_version='latest')
Call the text classification model.
Constructs the URI for the model based on the provided model’s name and version. If the name contains ://, it is treated as a complete URI. Otherwise, it looks up the model name in the well-known names dictionary. But after this, in any case, we construct a URI in the form cls://<folder_id>/
|
Parameters |
Model
class yandex_cloud_ml_sdk._models.text_classifiers.model.AsyncTextClassifiersModel
A class for text classifiers models. It provides the foundational structure for building text classification models, including configuration and execution of classification tasks.
async run(text, *, timeout=60)
Execute the text classification on the provided input text.
If only labels are specified, apply a zero-shot classifier. If samples are also specified - it is a case of the few-shot classifier. If nothing is specified, use the classify method, but it is only available for pre-trained models.
Read more about the classifiers in the documentation.
|
Parameters |
|
|
Return type |
async tune_deferred(train_datasets, *, classification_type, validation_datasets=Undefined, name=Undefined, description=Undefined, labels=Undefined, seed=Undefined, lr=Undefined, n_samples=Undefined, additional_arguments=Undefined, tuning_type=Undefined, scheduler=Undefined, optimizer=Undefined, timeout=60)
Initiate a deferred tuning process for the model.
|
Parameters |
|
|
Return type |
async tune(train_datasets, *, classification_type, validation_datasets=Undefined, name=Undefined, description=Undefined, labels=Undefined, seed=Undefined, lr=Undefined, n_samples=Undefined, additional_arguments=Undefined, tuning_type=Undefined, scheduler=Undefined, optimizer=Undefined, timeout=60, poll_timeout=259200, poll_interval=60)
Tune the model with the specified training datasets and parameters.
|
Parameters |
|
|
Return type |
async attach_tune_deferred(task_id, *, timeout=60)
Attach a deferred tuning task using its task ID.
|
Parameters |
|
|
Return type |
property config: ConfigTypeT
configure(*, task_description=Undefined, labels=Undefined, samples=Undefined)
|
Parameters |
|
|
Return type |
property uri: str