Client

Arize class to begin logging predictions and actuals.

Import and initialize Arize Client from arize.api

from arize.api import Client
class Client(
    api_key: str,
    space_key: str,
    uri: Optional[str] = "https://api.arize.com/v1",
    max_workers: Optional[int] = 8,
    max_queue_bound: Optional[int] = 5000
)
ArgumentData TypeDescription

api_key

str

(Required) Arize-provided api key associated with your service/space. Click "Show API Key" in the "Upload Data" page to copy the key.

space_key

str

(Required) Arize-provided identifier for relating records to spaces. Click "Show API Key" in the "Upload Data" page to copy the key. *If using version < 4.0.0, replace space_key=SPACE_KEY with organization_key=SPACE_KEY

uri

str

(Optional) URI endpoint required for on-prem customers. Defaults to "https://api.arize.com/v1"

max_workers

int

(Optional) Number of max concurrent requests to Arize. Default value = 8

max_queue_bound

int

(Optional) Number of maximum concurrent future objects queued for publishing to Arize. Default value = 5000

Code Example

from arize.api import Client
from arize.utils.types import ModelTypes, Environments, Embedding


API_KEY = 'ARIZE_API_KEY'
SPACE_KEY = 'YOUR SPACE KEY'
arize_client = Client(space_key=SPACE_KEY, api_key=API_KEY)

if SPACE_KEY == "SPACE_KEY" or API_KEY == "API_KEY":
    raise ValueError("❌ CHANGE SPACE AND API KEYS")
else:
    print("✅ Arize client setup done! Now you can start using Arize!")

Last updated

Copyright © 2023 Arize AI, Inc