Skip to main content

labqoat-python

Typed SDK and CLI for the Labqoat starter API. Distribution labqoat, import labqoat, commands lab and labqoat.

Quick start

from labqoat.client import Client

with Client("http://127.0.0.1:4000", "local", "your-password") as client:
    note = client.create_note("First", body="Hello")
    page = client.list_notes(limit=20)
    for item in client.iter_notes():
        print(item.id, item.title)

The CLI defaults to production at https://app.labqoat.com, which uses a publicly trusted certificate. Profiles saved with the old tunnel URL (https://127.0.0.1:4043) should be updated, and SSL_CERT_FILE no longer needs to point at the private installation CA. Log in:

lab auth login --username labqoat
lab status
lab run list

Work is grouped into projects: a named container that owns runs, datasets, dashboards and one research memory. Start in a working directory with:

lab project init my-benchmark
lab project current

init creates the project and pins it as [tool.labqoat] project = "my-benchmark" in ./pyproject.toml, so every command run from there acts on it. --project NAME and LABQOAT_PROJECT override the pin; without any of them the project named default is used. run list, dataset list and dashboard list show the selected project and take --all-projects; lab project move --to NAME --run ID (also --app, --dashboard, --dataset) reorganizes existing work. The SDK stays explicit: Client(..., project="my-benchmark") selects the project, and labqoat.projects.project_selection.ProjectSelection.resolve().name applies the CLI's lookup order in a script.

Use an explicit override for a local instance:

lab --base-url http://127.0.0.1:4000 status

Saved profiles retain their configured endpoints; --base-url overrides the selected profile. Credentials remain scoped to that endpoint. The SDK takes an explicit URL, as in the local example above.

Credentials use HTTP Basic on every request. Plain HTTP is accepted only for explicit loopback destinations.

Every submit command (run, train, eval, and import) accepts --watch to print the submission response and then stream durable run events, just like the corresponding watch command. Evaluations watch their primary run. Without the flag, submission returns immediately.

lab run submit my_package:RUN --watch
lab train submit my_training_job --epochs 10 --watch
lab eval submit my_evaluation --dataset team/data@v1 --model team/model@v1 --watch

Production GPU workloads can select hardware and a minimum per-device memory:

from labqoat.authoring.resources import Resources

resources = Resources(
    cpu_millicores=4000,
    memory_mb=16384,
    gpu_count=1,
    gpu_model="l40s",
    gpu_memory_mb=44 * 1024,
)

Use this resource declaration in the workload's runtime configuration. The legacy GpuResources(cpu=4, memory_gib=16, gpu_count=1, gpu_model="l40s", minimum_gpu_memory_gib=44) form expresses the same requirements. Omit the model or use "any" to choose any GPU meeting the memory floor. Production enforces both constraints for workers and model serving, including scale-from-zero. Memory means MiB per GPU, not combined VRAM or fractional GPU allocation. EC2 reports 22,888 MiB for L4/A10G, 45,776 MiB for L40S, and 81,920 MiB for H100; marketed 24/48 GB sizes should not be used as 24/48 GiB floors. The default production pool offers T4, A10G, L4, L40S and H100; configured pool limits still apply. Unsupported hardware combinations fail capacity admission.

Training submits from source. lab train submit packages the exact working tree, uploads it once, and accepts a run without importing, installing, or executing the workload on the submitting machine; only the CLI and the source files are required. The platform then prepares the run — building the image, compiling the workload contract inside it, resolving dependencies, and freezing the execution manifest — before scheduling training. Preparation stages are visible on the run as preparing status detail, and --watch follows preparation through training. Heavy third-party imports in workload modules are supported because inspection runs inside the built image.

Every logs command accepts --follow to keep printing new log entries. Run, training, evaluation, and import logs use the existing run log stream and stop when the run finishes. Inference, replica, worker, node, and pool logs use one server-sent event (SSE) connection until the server closes it or you press Ctrl-C. Existing time filters, sort order, limit, and starting cursor are sent with the initial streaming request. Following does not poll snapshots. Each log.entry event prints its unchanged JSON data as one line, flushed immediately for pipes; heartbeats are ignored and log.error events report a CLI error. Ctrl-C closes the connection. Without --follow, logs return the same single JSON page as before.

lab run logs RUN_ID --follow
lab train logs RUN_ID --follow
lab eval logs EVALUATION_ID --follow
lab inference logs DEPLOYMENT_ID --follow
lab inference replica logs REPLICA_ID --follow
lab worker logs WORKER_ID --follow

lab node logs NODE_ID reads /api/v1/nodes/item/logs?ref=NODE_ID once. The server returns logs from active and retained workloads on that node, including completed workers and serving replicas. Entries include node and source metadata and pass through the usual SDK response validation.

With --follow, the CLI reads /api/v1/nodes/item/logs/stream?ref=NODE_ID over one SSE connection and prints raw entry JSONL. The server discovers new workloads and supplies their log entries.

lab node list
lab node logs NODE_ID
lab node logs NODE_ID --follow

lab pool logs POOL_REF reads /api/v1/pools/item/logs?ref=POOL_REF once, with the same semantics as node logs across active and retained workloads in the pool. Entries preserve pool, node, and source attribution through SDK response validation. With --follow, the CLI uses one /api/v1/pools/item/logs/stream?ref=POOL_REF SSE connection and prints raw entry JSONL as the server discovers workloads and supplies their logs. Node and pool logs accept only their required reference and --follow; they do not accept cursor, limit, sort, or timestamp filters.

lab pool list
lab pool logs POOL_REF
lab pool logs POOL_REF --follow

Inference and evaluation

Inference uses ordinary @app.cls() declarations bound to immutable Artifacts. Submit Predictor(weights=weights).predict through client.runs or context.runs; each Run captures its code, image and constructor inputs. See weight-backed inference.

Evaluation functions submit ordinary inference and scoring Runs, retain typed prediction datasets, and return EvaluationReport.complete(...). The report validates exact expected membership, explicit Run attribution, consistent finite metric names and equal-weight means. It is an ordinary typed result with no separate publication or completion lifecycle. Rescoring explicitly passes a previous result and its retained predictions into another function. See NAM and Jev decision training.

Development

Use lab --version, labqoat --version, or bun run cli -- --version to identify the executing installation. Editable installs and direct source execution report the package version, current Git revision, and absolute Python package path, for example:

labqoat 0.1.0+local.g0123456789ab (/path/to/labqoat/packages/labqoat-python)

Tracked changes inside that package add .dirty after the revision. If Git is unavailable or the source has no commit, the revision is unknown and the source path is still shown. Standard wheel installs report only their package version, such as labqoat 0.1.0. Version output works offline without loading profiles or credentials and does not depend on the current directory.

  • uv sync --locked — reproducible environment (Python 3.13 development; 3.11 minimum supported).
  • uv run --locked pytest tests -q --testmon — affected class-based unit tests.
  • ruff format / ruff check / strict mypy — same gates for source, tests, support, and generated code.
  • src/labqoat/_generated/ is owned by the schema emitter; never hand-edit.

Metadata

Release files for labqoat 0.2.19

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

Source distribution (sdist)

Source distribution for labqoat 0.2.19
File Size Uploaded
labqoat-0.2.19.tar.gz 579.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for labqoat 0.2.19
File Interpreter ABI Platform
labqoat-0.2.19-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / labqoat-0.2.19.tar.gz

Download URL labqoat-0.2.19.tar.gz
Size 579.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c93518354bb213dd183da084c66f401d9e56d0fc77e7a601f366d1205a835010
BLAKE2b-256 checksum
How to use checksums
6465614dc8902a6925daf180fed245b8df4576b2ee2f9e7d87b5f0beb82f92aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.2

Release files / labqoat-0.2.19-py3-none-any.whl

Download URL labqoat-0.2.19-py3-none-any.whl
Size 957.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33921c42c27987d4c547b7f189356e21c256cb0272d72558020f86b58c729802
BLAKE2b-256 checksum
How to use checksums
225e4df2cc40bd4a5b3bbf5d73b2b92cd64fbe7295e33f4f85cf033ec9388c1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.2

Release history Release notifications | RSS feed

0.2.25

2 release files

0.2.24

2 release files

0.2.23

2 release files

0.2.22

2 release files

0.2.21

2 release files

0.2.20

2 release files

This release

0.2.19 This release

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.60

2 release files

0.1.59

2 release files

0.1.58

2 release files

0.1.57

2 release files

0.1.56

2 release files

0.1.55

2 release files

0.1.54

2 release files

0.1.53

2 release files

0.1.52

2 release files

0.1.51

2 release files

0.1.50

2 release files

0.1.49

2 release files

0.1.48

2 release files

0.1.47

2 release files

0.1.46

2 release files

0.1.45

2 release files

0.1.44

2 release files

0.1.43

2 release files

0.1.42

2 release files

0.1.41

2 release files

0.1.40

2 release files

0.1.39

2 release files

0.1.38

2 release files

0.1.37

2 release files

0.1.36

2 release files

0.1.35

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.32

2 release files

0.1.31

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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