Python client for the Gnosys Labs autonomous experimentation platform
Project description
gnosys
Python client for Gnosys Labs — the autonomous experimentation platform that proposes ML pipelines, runs them, statistically validates the results against selection bias, and only promotes what survives.
Install
pip install gnosyslabs
Installed as
gnosyslabs, imported asgnosys(likescikit-learn→sklearn). The bare PyPI namegnosysis an unrelated project.
Quickstart
from gnosys import GnosysClient
# API key from the dashboard at https://gnosyslabs.com/dashboard/api-keys.
# Or set $GNOSYS_API_KEY in your environment.
client = GnosysClient(api_key="gn_live_...")
# Kick off a hyperparameter sweep on a tabular classification problem.
run = client.runs.create(
domain="tabular",
strategist={
"kind": "hp_sweep",
"key": "C",
"values": [0.001, 0.01, 0.1, 1.0, 10.0],
},
spec_template={
"spec_id": "_t",
"name": "LR sweep",
"hypothesis": "regularisation strength",
"task": "classification",
"dataset_id": "synthetic_binary",
"model_family": "logistic",
"hyperparameters": {"C": 1.0},
},
max_iterations=4,
no_progress_window=2,
)
# Block until the run finishes (or hit timeout).
run = client.runs.wait(run.run_id, timeout=600)
print(f"final tier: {run.status}, error: {run.error}")
# Pull the validation findings — same data shape `stigmera diagnose
# findings` shows in the internal CLI.
for finding in client.findings.list(run_id=run.run_id, severity="blocker"):
print(f"[{finding.severity}] {finding.validator}: {finding.detail}")
What the platform does
You hand Gnosys a spec template (dataset + model family + hyperparameters) and it runs a closed propose-execute-validate-promote loop:
- Propose — a strategist (rule-based HP sweep, or LLM-driven) emits the next batch of pipeline variants.
- Execute — the platform fits and scores each one.
- Validate — the bidirectional validation layer catches generators that fool their own evaluator: multi-calibrated ensembles, distribution-shift decomposition, four honest-eval verifiers (shuffled-label, randomized-feature, secondary-holdout, permutation-FWER) plus an opt-in pre-execute LLM critic.
- Promote — surviving pipelines get tier-classified (library / candidate / paper).
Round-by-round validation findings flow back to the strategist as structured prose so the next round's proposals adapt.
API surface
The client wraps the public REST API at https://gnosyslabs.com/v1/*.
Every method is available on both GnosysClient (sync) and
AsyncGnosysClient.
Runs
run = client.runs.create(domain=..., strategist=..., ...)
run = client.runs.get(run_id)
run = client.runs.wait(run_id, timeout=600, poll_interval=2.0)
runs = client.runs.list(status="completed", limit=50)
iterations = client.runs.iterations(run_id)
Findings
findings = client.findings.list(
run_id="...", # or pipeline_run_id
validator="honest_eval.shuffled_label",
severity="blocker", # info|low|medium|high|blocker
spec_id="...",
limit=100,
)
Correlations (cross-validator)
matches = client.findings.correlations(
validators=["llm_critic", "honest_eval.shuffled_label"],
severity="blocker",
mode="and", # specs flagged by ALL of them
)
API keys
keys = client.api_keys.list()
client.api_keys.revoke(key_id)
Errors
from gnosys import (
GnosysError, # base class
AuthenticationError, # 401 — missing / revoked key
ForbiddenError, # 403 — tenant suspended
NotFoundError, # 404 — wrong run id, or another tenant's
RateLimitError, # 429 — see error.retry_after
ValidationError, # 400 — bad request payload
ServerError, # 5xx — caught after retry exhaustion
)
try:
run = client.runs.create(domain="tabular", ...)
except RateLimitError as exc:
time.sleep(exc.retry_after or 60)
Async
from gnosys import AsyncGnosysClient
async def main():
async with AsyncGnosysClient(api_key="gn_live_...") as client:
run = await client.runs.create(...)
run = await client.runs.wait(run.run_id)
async for finding in client.findings.iter(run_id=run.run_id):
...
Configuration
| Setting | Default | Override |
|---|---|---|
| API key | (required) | GnosysClient(api_key=...) or $GNOSYS_API_KEY |
| Base URL | https://gnosyslabs.com |
GnosysClient(base_url=...) or $GNOSYS_BASE_URL |
| Request timeout | 30s | GnosysClient(timeout=...) |
| Max retries | 3 (on 429 / 5xx) | GnosysClient(max_retries=...) |
Documentation
Full docs at docs.gnosyslabs.com, including quickstart guides for tabular classification, HP sweeps, LLM-driven discovery, and the validation-layer concepts (the deception test, the four honest-eval verifiers, and the explanations registry).
License
Proprietary. See LICENSE. Free to use against gnosyslabs.com; redistribution restricted.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gnosyslabs-1.0.0.tar.gz.
File metadata
- Download URL: gnosyslabs-1.0.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a384e84120f3214c75433df1377973ce9c19c028ac3ee181a1a0504f873c9454
|
|
| MD5 |
b3a045c0149842d11b04b5dbfcde126a
|
|
| BLAKE2b-256 |
7b5b8b9490064a15f78bd870ea4f854daa1423335c296f86498064a833fac6c8
|
File details
Details for the file gnosyslabs-1.0.0-py3-none-any.whl.
File metadata
- Download URL: gnosyslabs-1.0.0-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65e3ef2564ca05c0a8a162c1b29525c53bd9697cc2b206fa962fab8c883831d3
|
|
| MD5 |
25318b41d6a145a6d2f09c8557f82a78
|
|
| BLAKE2b-256 |
17a255c27869572a38da093871ba21dd89936837a18b765bb434d6665e1f6def
|