Skip to main content

Gradient Explorer Client Library

Project description

source ./venv/bin/activate

This repo is intended to reimplement some key features of wandb for our own purposes. This is the pythonic frontend for our wandb-for-tensors service.

Repo features: pip install gradexp gradexp login -> opens webpage -> gets token and stores in in permanent context In python file:

import gradexp
gradexp.init("project name")

...

# Automatically starts tracking run id, step, etc
gradexp.log(TODO ... )

...

App-wide features:

  1. Local staging + asynchronous streaming When you call wandb.log() in your training script, the client SDK:

collects the metric/media payload locally (in memory and also writes to local run files).

hands it off to a separate streaming thread/process that runs alongside your main process.

this uploader process asynchronously batches and sends events over the network. This avoids blocking your training process.

events are queued in memory and written to disk if needed (e.g., offline mode) and then eventually synced.

if you set WANDB_MODE=offline, nothing is sent to the server until a sync is triggered. This behavior effectively decouples ingestion from your training loop. It’s not “direct write to bucket” from your app — it goes through this upload pipeline first. Weights & Biases Documentation

  1. Upload endpoints and storage target On the server side (hosted or self-managed):

incoming streaming events (metrics, history tuples) arrive via W&B’s application backend.

metadata and small event records (like per-step metrics) are stored relationally (MySQL in self-managed reference architecture).

larger blobs (logs, media files, artifacts) are written out to object storage buckets (e.g., S3 or your own BYOB bucket). You don’t stream directly into the bucket in small per-log increments — the backend receives the event first and the service layer persists the data. Weights & Biases Documentation +1

  1. How “appending” works Object storage (S3/compatible) isn’t a traditional file system — you can’t literally open and append to an existing file like with a local file. Instead:

W&B will write each piece of logged data as a separate object or part of a structured object.

for metric history exports (e.g., after a run completes), W&B creates Parquet exports and pushes those into the bucket as artifacts/history files.

this is a batch write rather than incremental byte-level append. The UI and service layer then stitch these pieces together logically for history views. (This pattern is common across object-store backed systems — you don’t append bytes to objects at every metric call in practice.) Weights & Biases Documentation

  1. Back-end buffering & batching Even though metrics are “live” in the UI, there’s batching:

the SDK batches small updates and flushes over HTTP.

on the server side, those are ingested through API layers and persisted into the database or stored as discrete objects.

visualization updates pull from the latest ingested state. The “real-time” aspect is achieved by frequent flushes and update propagation — not by writing to a monolithic streaming file. W&B’s process model means it tolerates network latency/outages by buffering locally and then syncing when available.

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

gradexp-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

gradexp-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file gradexp-0.1.0.tar.gz.

File metadata

  • Download URL: gradexp-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gradexp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a28d1eb65bb5b977fe9b4dace7ff36b0b330a9dc256a5d4a6de84b92ba0895c1
MD5 eb83eb9f354caa306fb10c2abd43ae30
BLAKE2b-256 f32339ff8216b1b6a6cc0e8b8c9162b2f066f22721aadccc531a1f4d767a6441

See more details on using hashes here.

File details

Details for the file gradexp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gradexp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gradexp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e70a19551dc549ea4d789939743495b6a8e7b0cd7510aa181cf9a81a46cd236
MD5 6241b30d054adadded40652d92a8d15d
BLAKE2b-256 367edb73f2fcf3544e8d26690b59bcb819987fede8b59b749c74191acf66559f

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