Skip to main content
Quality targets define measurable quality goals for your labeling projects. They can trigger alerts when quality metrics fall below specified thresholds.

Methods

list

List all quality targets for a project.
client.quality_targets.list(
    project_uid="proj_123",
    limit=100,
    cursor="next_page_token"
)
project_uid
str
required
UID of the project
limit
int
Maximum number of quality targets to return per page
cursor
str
Pagination cursor for fetching the next page
data
list[QualityTarget]
List of quality target objects
next_cursor
str
Cursor for the next page of results

get

Retrieve a specific quality target.
client.quality_targets.get(
    project_uid="proj_123",
    uid="target_123"
)
project_uid
str
required
UID of the project
uid
str
required
Unique identifier of the quality target
uid
str
Unique identifier of the quality target
name
str
Name of the quality target
metric
str
Quality metric to measure (e.g., “accuracy”, “precision”, “recall”)
threshold
float
Target threshold value
operator
str
Comparison operator (e.g., “gte”, “lte”, “eq”)
severity
str
Severity level when threshold is not met (e.g., “warning”, “error”)
is_active
bool
Whether the quality target is currently active
notify_webhook
bool
Whether to send webhook notifications
notify_emails
list[str]
Email addresses to notify when threshold is not met

create

Create a new quality target for a project.
client.quality_targets.create(
    project_uid="proj_123",
    name="Minimum Accuracy Target",
    metric="accuracy",
    threshold=0.95,
    operator="gte",
    severity="warning",
    is_active=True,
    notify_webhook=True,
    notify_emails=["[email protected]"]
)
project_uid
str
required
UID of the project
name
str
required
Name of the quality target
metric
str
required
Quality metric to measure (e.g., “accuracy”, “precision”, “recall”, “f1_score”)
threshold
float
required
Target threshold value (0.0 to 1.0 for most metrics)
operator
str
Comparison operator: “gte”, “lte”, “eq”, “gt”, or “lt”
severity
str
Severity level: “info”, “warning”, “error”, “critical”
is_active
bool
Whether the quality target should be active immediately (default: true)
notify_webhook
bool
Whether to send webhook notifications when threshold is not met
notify_emails
list[str]
Email addresses to notify when threshold is not met

update

Update an existing quality target.
client.quality_targets.update(
    project_uid="proj_123",
    uid="target_123",
    threshold=0.98,
    severity="error"
)
project_uid
str
required
UID of the project
uid
str
required
Unique identifier of the quality target to update
name
str
Updated name
metric
str
Updated metric
threshold
float
Updated threshold value
operator
str
Updated comparison operator
severity
str
Updated severity level
is_active
bool
Whether the quality target should be active
notify_webhook
bool
Updated webhook notification setting
notify_emails
list[str]
Updated email notification list

delete

Delete a quality target.
client.quality_targets.delete(
    project_uid="proj_123",
    uid="target_123"
)
project_uid
str
required
UID of the project
uid
str
required
Unique identifier of the quality target to delete

evaluate

Evaluate all quality targets for a project against current metrics.
client.quality_targets.evaluate(project_uid="proj_123")
project_uid
str
required
UID of the project to evaluate
results
list[QualityTargetEvaluation]
List of evaluation results for each quality target
results[].target_uid
str
UID of the evaluated quality target
results[].metric
str
Metric that was evaluated
results[].current_value
float
Current value of the metric
results[].threshold
float
Target threshold
results[].passed
bool
Whether the current value meets the threshold
results[].severity
str
Severity level if threshold not met

Async Methods

All methods are available in async form through AsyncAvala:
await client.quality_targets.list(project_uid="proj_123")
await client.quality_targets.get(project_uid="proj_123", uid="target_123")
await client.quality_targets.create(
    project_uid="proj_123",
    name="Accuracy Target",
    metric="accuracy",
    threshold=0.95
)
await client.quality_targets.update(
    project_uid="proj_123",
    uid="target_123",
    threshold=0.98
)
await client.quality_targets.delete(project_uid="proj_123", uid="target_123")
await client.quality_targets.evaluate(project_uid="proj_123")

Build docs developers (and LLMs) love