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_id: str,
uri: Optional[str] = "https://api.arize.com/v1",
max_workers: Optional[int] = 8,
max_queue_bound: Optional[int] = 5000
)
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_id
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_id=SPACE_ID
with organization_key=SPACE_ID
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_ID = 'YOUR SPACE ID'
arize_client = Client(space_id=SPACE_ID, api_key=API_KEY)
if SPACE_ID == "SPACE_ID" or API_KEY == "API_KEY":
raise ValueError("❌ CHANGE SPACE ID AND/OR API KEY")
else:
print("✅ Arize client setup done! Now you can start using Arize!")
Last updated
Was this helpful?