scorable.objectives¶
Classes¶
Wrapper for a single Objective. |
|
Wrapper for a single Objective. |
|
Objectives API |
|
Version listing (sub)API |
Module Contents¶
- class scorable.objectives.AObjective¶
Bases:
scorable.generated.openapi_aclient.models.objective.ObjectiveWrapper for a single Objective.
For available attributes, please check the (automatically generated) superclass documentation.
- client_context: scorable.utils.ClientContextCallable¶
- class scorable.objectives.Objective¶
Bases:
scorable.generated.openapi_client.models.objective.ObjectiveWrapper for a single Objective.
For available attributes, please check the (automatically generated) superclass documentation.
- client_context: scorable.utils.ClientContextCallable¶
- class scorable.objectives.Objectives(client_context: scorable.utils.ClientContextCallable)¶
Objectives API
Note
The construction of the API instance should be handled by accesing an attribute of a
scorable.client.Scorableinstance.- Parameters:
client_context (scorable.utils.ClientContextCallable)
- async acreate(*, intent: str | None = None, test_dataset_id: str | None = None, _request_timeout: int | None = None, _client: scorable.generated.openapi_aclient.ApiClient) AObjective¶
Asynchronously create a new objective and return its ID.
- Parameters:
intent (Optional[str]) – The intent of the objective.
test_dataset_id (Optional[str]) – The ID of the test dataset
_request_timeout (Optional[int])
_client (scorable.generated.openapi_aclient.ApiClient)
- Return type:
- async adelete(objective_id: str, *, _request_timeout: int | None = None, _client: scorable.generated.openapi_aclient.ApiClient) None¶
Asynchronously delete the objective from the registry.
- Parameters:
objective_id (str) – The objective to be deleted.
_request_timeout (Optional[int])
_client (scorable.generated.openapi_aclient.ApiClient)
- Return type:
None
- async aget(objective_id: str, *, _client: scorable.generated.openapi_aclient.ApiClient, _request_timeout: int | None = None) AObjective¶
Asynchronously get an objective by ID.
- Parameters:
objective_id (str) – The objective to be fetched.
_client (scorable.generated.openapi_aclient.ApiClient)
_request_timeout (Optional[int])
- Return type:
- async alist(*, intent: str | None = None, limit: int = 100) AsyncIterator[scorable.generated.openapi_aclient.models.objective_list.ObjectiveList]¶
Asynchronously iterate through the objectives.
- Parameters:
intent (Optional[str]) – Specific intent the returned objectives must match.
limit (int) – Number of entries to iterate through at most.
- Return type:
AsyncIterator[scorable.generated.openapi_aclient.models.objective_list.ObjectiveList]
- async aupdate(objective_id: str, *, intent: str | None = None, test_dataset_id: str | None = None, _request_timeout: int | None = None, _client: scorable.generated.openapi_aclient.ApiClient) AObjective¶
Asynchronously update an existing objective.
- Parameters:
objective_id (str) – The objective to be updated.
intent (Optional[str]) – The intent of the objective.
test_dataset_id (Optional[str])
_request_timeout (Optional[int])
_client (scorable.generated.openapi_aclient.ApiClient)
- Return type:
- create(*, intent: str | None = None, test_dataset_id: str | None = None, _request_timeout: int | None = None, _client: scorable.generated.openapi_client.ApiClient) Objective¶
Create a new objective and return its ID.
- Parameters:
intent (Optional[str]) – The intent of the objective.
test_dataset_id (Optional[str]) – The ID of the test dataset
_request_timeout (Optional[int])
_client (scorable.generated.openapi_client.ApiClient)
- Return type:
- delete(objective_id: str, *, _request_timeout: int | None = None, _client: scorable.generated.openapi_client.ApiClient) None¶
Delete the objective from the registry.
- Parameters:
objective_id (str) – The objective to be deleted.
_request_timeout (Optional[int])
_client (scorable.generated.openapi_client.ApiClient)
- Return type:
None
- get(objective_id: str, *, _client: scorable.generated.openapi_client.ApiClient, _request_timeout: int | None = None) Objective¶
Get an objective by ID.
- Parameters:
objective_id (str) – The objective to be fetched.
_client (scorable.generated.openapi_client.ApiClient)
_request_timeout (Optional[int])
- Return type:
- list(*, intent: str | None = None, limit: int = 100, _client: scorable.generated.openapi_client.ApiClient) Iterator[scorable.generated.openapi_client.models.objective_list.ObjectiveList]¶
Iterate through the objectives.
- Parameters:
intent (Optional[str]) – Specific intent the returned objectives must match.
limit (int) – Number of entries to iterate through at most.
_client (scorable.generated.openapi_client.ApiClient)
- Return type:
Iterator[scorable.generated.openapi_client.models.objective_list.ObjectiveList]
- update(objective_id: str, *, intent: str | None = None, test_dataset_id: str | None = None, _request_timeout: int | None = None, _client: scorable.generated.openapi_client.ApiClient) Objective¶
Update an existing objective.
- Parameters:
objective_id (str) – The objective to be updated.
intent (Optional[str]) – The intent of the objective.
test_dataset_id (Optional[str])
_request_timeout (Optional[int])
_client (scorable.generated.openapi_client.ApiClient)
- Return type:
- client_context¶
- versions¶
- class scorable.objectives.Versions(client_context: scorable.utils.ClientContextCallable)¶
Version listing (sub)API
Note that this should not be directly instantiated.
- Parameters:
client_context (scorable.utils.ClientContextCallable)
- async alist(objective_id: str) scorable.generated.openapi_aclient.models.paginated_objective_list.PaginatedObjectiveList¶
Asynchronously list all versions of an objective.
- Parameters:
objective_id (str) – The objective to list the versions for
- Return type:
scorable.generated.openapi_aclient.models.paginated_objective_list.PaginatedObjectiveList
- list(objective_id: str, *, _client: scorable.generated.openapi_client.ApiClient) scorable.generated.openapi_client.models.paginated_objective_list.PaginatedObjectiveList¶
List all versions of an objective.
- Parameters:
objective_id (str) – The objective to list the versions for
_client (scorable.generated.openapi_client.ApiClient)
- Return type:
scorable.generated.openapi_client.models.paginated_objective_list.PaginatedObjectiveList
- client_context¶