Skip to main content

Raga Testing Platform

The raga-testing-platform package provides a Python client for interacting with the Raga Testing Platform. It allows you to easily create and manage test sessions, datasets, and perform various testing operations.

Installation

You can install raga-testing-platform using pip:

pip install raga-testing-platform

Usage

To use the package, import the necessary classes and modules:

from raga import Dataset, TestSession, Auth
import pandas as pd
from typing import Optional, List, Dict

Creating a test DataFrame

test_df = pd.DataFrame({
    'column1': [1, 2, 3],
    'column2': ['a', 'b', 'c']
})

Defining the Schema class

class Schema:
    def __init__(
        self,
        prediction_id: Optional[str] = None,
        timestamp_column_name: Optional[str] = None,
        feature_column_names: Optional[List[str]] = None,
        metadata_column_names: Optional[List[str]] = None,
        label_column_names: Optional[Dict[str, str]] = None,
        embedding_column_names: Optional[Dict[str, str]] = None,
    ):
        self.prediction_id = prediction_id
        self.timestamp_column_name = timestamp_column_name
        self.feature_column_names = feature_column_names
        self.metadata_column_names = metadata_column_names
        self.label_column_names = label_column_names
        self.embedding_column_names = embedding_column_names

Creating an instance of the Schema class

schema = Schema()

Creating an instance of the Auth class

It will create auth token for further usages.

auth = Auth()

This variable stores auth token. You can use it untill expire token.

auth.token

Creating an instance of the TestSession class

In this instance experiment will create and return experiment_id

experiment_id = TestSession(token, 1, "my_experiment")

This variable stores experiment_id. You can use it in further experiment.

experiment_id.experiment_id

Creating an instance of the Dataset class

test_ds = Dataset(token, experiment_id, test_df, schema, "DatasetName")

Loading labels from a file

test_ds.load_labels_from_file(
    "/path/to/labels.json",
    "dataset_name",
    "id_column_name",
    "label_column_name",
    "metadata_column_name",
    "category_column_name",
    "category_id_column_name"
)

To Debug

export DEBUG=1

Metadata

Release files for raga-testing-platform 1.1.79

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for raga-testing-platform 1.1.79
File Size Uploaded Provenance Actions
raga_testing_platform-1.1.79.tar.gz 5.9 MB Without provenance Details for raga_testing_platform-1.1.79.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for raga-testing-platform 1.1.79
File Interpreter ABI Platform Actions
raga_testing_platform-1.1.79-py3-none-any.whl Python 3 none any Details for raga_testing_platform-1.1.79-py3-none-any.whl

Total release size: 6.0 MB

Release files / raga_testing_platform-1.1.79.tar.gz

Download URL raga_testing_platform-1.1.79.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
a83ae0632a5d01d5c29c4f61421ce2a5a1b6f09b8e76ab9a552588962eb831e3
BLAKE2b-256 checksum
How to use checksums
1349cc3b2848285dc5bc5fd76ae7111a93e2e3529869692010ac5e2789c84439
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / raga_testing_platform-1.1.79-py3-none-any.whl

Download URL raga_testing_platform-1.1.79-py3-none-any.whl
Size 60.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cd69e29970b9239ecc25d427276d8b18a0807831f3d44f8963a6b5386267474
BLAKE2b-256 checksum
How to use checksums
40aa5a628287128a7a69764a45a9f0d00bdcac7246a7b96f4bdb5998a0ce8f8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for raga-testing-platform 1.1.79

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.79 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page