Skip to content

orca_sdk.async_client#

ColumnType module-attribute #

ColumnType = Literal[
    "STRING",
    "FLOAT",
    "INT",
    "BOOL",
    "ENUM",
    "IMAGE",
    "OTHER",
]

The type of a column in a datasource

JobStatus module-attribute #

JobStatus = Literal[
    "INITIALIZED",
    "DISPATCHED",
    "WAITING",
    "PROCESSING",
    "COMPLETED",
    "FAILED",
    "ABORTING",
    "ABORTED",
]

Status of job in the job queue

PretrainedEmbeddingModelName module-attribute #

PretrainedEmbeddingModelName = Literal[
    "CLIP_BASE",
    "GTE_BASE",
    "CDE_SMALL",
    "DISTILBERT",
    "GTE_SMALL",
    "MXBAI_LARGE",
    "E5_LARGE",
    "BGE_BASE",
    "GIST_LARGE",
]

Names of pretrained embedding models that are supported by OrcaCloud

WorkerStatus module-attribute #

WorkerStatus = Literal[
    "IDLE", "BUSY", "DRAINING", "SHUTDOWN", "CRASHED"
]

Status of worker in the worker pool

ActionRecommendation #

Bases: TypedDict

action instance-attribute #

action

The recommended action to take

rationale instance-attribute #

rationale

Explanation for why this action was recommended

PRCurve #

Bases: TypedDict

thresholds instance-attribute #

thresholds

Threshold values for the curve

precisions instance-attribute #

precisions

Precision values at each threshold

recalls instance-attribute #

recalls

Recall values at each threshold

PredictionFeedbackRequest #

Bases: TypedDict

value instance-attribute #

value

The feedback value. For updates, UNSET means keep existing value. None means delete the feedback.

comment instance-attribute #

comment

Optional comment. For updates, UNSET means keep existing comment. None means remove the comment.

ROCCurve #

Bases: TypedDict

thresholds instance-attribute #

thresholds

Threshold values for the curve

false_positive_rates instance-attribute #

false_positive_rates

False positive rate values at each threshold

true_positive_rates instance-attribute #

true_positive_rates

True positive rate values at each threshold

RegressionMetrics #

Bases: TypedDict

coverage instance-attribute #

coverage

Percentage of predictions that are not none

mse instance-attribute #

mse

Mean squared error of the predictions

rmse instance-attribute #

rmse

Root mean squared error of the predictions

mae instance-attribute #

mae

Mean absolute error of the predictions

r2 instance-attribute #

r2

R-squared score (coefficient of determination) of the predictions

explained_variance instance-attribute #

explained_variance

Explained variance score of the predictions

loss instance-attribute #

loss

Mean squared error loss of the predictions

anomaly_score_mean instance-attribute #

anomaly_score_mean

Mean of anomaly scores across the dataset

anomaly_score_median instance-attribute #

anomaly_score_median

Median of anomaly scores across the dataset

anomaly_score_variance instance-attribute #

anomaly_score_variance

Variance of anomaly scores across the dataset

warnings instance-attribute #

warnings

Human-readable warnings about skipped or adjusted metrics

GetMemorysetByNameOrIdMemoryByMemoryIdParams #

Bases: TypedDict

memory_id instance-attribute #

memory_id

ID of the memory

DeleteMemorysetByNameOrIdMemoryByMemoryIdParams #

Bases: TypedDict

memory_id instance-attribute #

memory_id

ID of the memory

PostEmbeddingModelUploadRequest #

Bases: TypedDict

name instance-attribute #

name

Name for the embedding model

description instance-attribute #

description

Optional description for the embedding model

PostDatasourceUploadRequest #

Bases: TypedDict

name instance-attribute #

name

Name for the datasource

description instance-attribute #

description

Optional description for the datasource

GetDatasourceByNameOrIdDownloadParams #

Bases: TypedDict

file_type instance-attribute #

file_type

File type to download: * hf_dataset: Zipped HuggingFace dataset (default) * json: Row-oriented JSON array * csv: CSV file

GetClassificationModelParams #

Bases: TypedDict

memoryset_name_or_id instance-attribute #

memoryset_name_or_id

Filter by memoryset name or ID

GetRegressionModelParams #

Bases: TypedDict

memoryset_name_or_id instance-attribute #

memoryset_name_or_id

Filter by memoryset name or ID

GetPredictiveModelParams #

Bases: TypedDict

memoryset_name_or_id instance-attribute #

memoryset_name_or_id

Filter by memoryset name or ID

GetTelemetryPredictionByPredictionIdParams #

Bases: TypedDict

calc_neighborhood_density instance-attribute #

calc_neighborhood_density

Calculate neighborhood density

GetTelemetryPredictionByPredictionIdMemorySuggestionsParams #

Bases: TypedDict

prediction_id instance-attribute #

prediction_id

ID of the prediction to generate suggestions for

num_memories instance-attribute #

num_memories

Number of memory suggestions to generate

refresh instance-attribute #

refresh

Force the explanation agent to re-run even if a cached explanation exists

ClassificationMetrics #

Bases: TypedDict

coverage instance-attribute #

coverage

Percentage of predictions that are not none

f1_score instance-attribute #

f1_score

F1 score of the predictions

accuracy instance-attribute #

accuracy

Accuracy of the predictions

loss instance-attribute #

loss

Cross-entropy loss of the logits

anomaly_score_mean instance-attribute #

anomaly_score_mean

Mean of anomaly scores across the dataset

anomaly_score_median instance-attribute #

anomaly_score_median

Median of anomaly scores across the dataset

anomaly_score_variance instance-attribute #

anomaly_score_variance

Variance of anomaly scores across the dataset

roc_auc instance-attribute #

roc_auc

Receiver operating characteristic area under the curve

pr_auc instance-attribute #

pr_auc

Average precision (area under the curve of the precision-recall curve)

pr_curve instance-attribute #

pr_curve

Precision-recall curve

roc_curve instance-attribute #

roc_curve

Receiver operating characteristic curve

confusion_matrix instance-attribute #

confusion_matrix

Confusion matrix where the entry at row i, column j is the count of samples with true label i predicted as label j

warnings instance-attribute #

warnings

Human-readable warnings about skipped or adjusted metrics

OrcaAsyncClient #

Bases: AsyncClient

__init__ #

__init__(
    *,
    api_key=None,
    base_url="",
    headers=None,
    transport=None,
    timeout=None,
    limits=None,
    max_redirects=20,
    event_hooks=None,
    http1=True,
    http2=False,
    proxy=None,
    log_level=logging.WARNING
)

Initialize an OrcaAPI async httpx client

Parameters:

  • api_key (str | None, default: None ) –

    API key to use for authentication, will default to ORCA_API_KEY if not set.

  • base_url (URL | str, default: '' ) –

    URL of the OrcaAPI, will default to ORCA_API_URL or the cloud API URL if not set.

use #

use()

Context manager to inject this async client into OrcaSDK async methods