Skip to main content

Client library for using Snitch AI's model validation platform

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Snitch AI Python Client Library

This library is used to perform Snitch AI analyses in a programmatic manner. This allows for easier upload to the Snitch AI platform without having to use the UI. Additionally, this library can facilitate integration with existing MLOps pipelines and external reporting tools.

Usage:

Generate a quality report

import snitch_ai

# you can specify the access_token in code or set the SNITCH_ACCESS_TOKEN environment variable 
snitch_ai.access_token = "VGhpcyBpcyBub3QgYW4gYWN0dWFsIGFjY2VzcyB0b2tlbi4gVG8gZ2V0I..."

project = snitch_ai.select_project("My First Project")

quality = project.run_quality_analysis(model, train_x, train_y, test_x, test_y)

json = quality.get_json()
quality.save_pdf("My Quality Report.pdf")

Generate a drift report

import snitch_ai

# you can specify the access_token in code or set the SNITCH_ACCESS_TOKEN environment variable
snitch_ai.access_token = "VGhpcyBpcyBub3QgYW4gYWN0dWFsIGFjY2VzcyB0b2tlbi4gVG8gZ2V0I..."

project = snitch_ai.select_project("My First Project")

drift = project.run_drift_analysis(train_x, updated_x)

json = drift.get_json()
drift.save_pdf("My Drift Report.pdf")

Usage within a hybrid environment

Snitch AI can also be used in a hybrid environment. This gives you the full power of Snitch AI's analysis engine without needing to upload your models or datasets to the cloud. If your internal security policy forbids uploading your data to a public cloud, this will likely be your preferred method of using Snitch AI.

You can learn more about Snitch AI Hybrid here: https://www.snit.ch/hybrid/

import snitch_ai

# replace this address with the address of your on-premises Snitch AI environment
# you can also set this in the SNITCH_ENDPOINT_ADDRESS environment variable
snitch_ai.endpoint_address = "https://hybridenvironment.local:8443/"

# you can specify the access_token in code or set the SNITCH_ACCESS_TOKEN environment variable
snitch_ai.access_token = "VGhpcyBpcyBub3QgYW4gYWN0dWFsIGFjY2VzcyB0b2tlbi4gVG8gZ2V0I..."

# perform quality or drift analysis per usual

Full product documentation can be found at https://help.snit.ch/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snitch_ai-1.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snitch_ai-1.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file snitch_ai-1.1.0.tar.gz.

File metadata

  • Download URL: snitch_ai-1.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for snitch_ai-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d2fb4dc46a2b7b53e3b0257c5b359538325f4eb6301fd12a2b0fbe39d2ae9989
MD5 527c517ab488da5c494f0f9a776c9ebc
BLAKE2b-256 1df95ab3e0985eb2a77e2bbb055816d620349d88751937425588cb4200db3280

See more details on using hashes here.

File details

Details for the file snitch_ai-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: snitch_ai-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for snitch_ai-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b60f56543df78cb171665d2fd31278f69b67d82dad818a928064c4e0ab5d9a28
MD5 10207113220726677251cebe7bf931a1
BLAKE2b-256 0562e2dfed42f83d418f6172800bddfa33ede83f84a7127c7b6619cac81deca9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page