Skip to main content

Python SDK for Gradlog ML experiment tracking

Project description

Gradlog Python SDK

Python SDK for Gradlog ML experiment tracking.

Installation

pip install gradlog

Quick Start

import gradlog

# Initialize the client with your API key
client = gradlog.Client(
    host="https://your-gradlog-instance.com",
    api_key="gl_your_api_key"
)

# Create or get a project
project = client.get_or_create_project("my-ml-project")

# Create or get an experiment
experiment = project.get_or_create_experiment("hyperparameter-search")

# Start a run
with experiment.start_run(name="run-001") as run:
    # Log parameters
    run.log_params({
        "learning_rate": 0.001,
        "batch_size": 32,
        "epochs": 100
    })
    
    # Log metrics during training
    for epoch in range(100):
        loss = train_epoch()
        run.log_metric("loss", loss, step=epoch)
        run.log_metric("accuracy", evaluate(), step=epoch)
    
    # Log artifacts
    run.log_artifact("model.pt", "/path/to/model.pt")
    
    # Run automatically completes when exiting the context

Using Raw HTTP API

You can also use the SDK to make raw API calls:

import gradlog

client = gradlog.Client(
    host="https://your-gradlog-instance.com",
    api_key="gl_your_api_key"
)

# Make raw API calls
response = client.get("/api/v1/projects")
projects = response.json()

Environment Variables

The SDK supports configuration via environment variables:

  • GRADLOG_HOST: The Gradlog server URL
  • GRADLOG_API_KEY: Your API key
import gradlog

# Will use environment variables
client = gradlog.Client()

License

MIT

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

gradlog-0.1.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

gradlog-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file gradlog-0.1.1.tar.gz.

File metadata

  • Download URL: gradlog-0.1.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gradlog-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dce0d06525f4914207e0652df7fb1510523d31024c4b59942bf2265026dc8065
MD5 b4a1cd1e20d78d58720227bf46f46ee4
BLAKE2b-256 a347039d246b87728230b0508435d33d962485852d6dde01dadeb7832f7813ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradlog-0.1.1.tar.gz:

Publisher: publish-sdk.yml on verynewusername/gradlog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gradlog-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gradlog-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gradlog-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73b30f26f620cdb87e3eaa45232b4fadbd736e2835c24dd358eafe88315cb9bd
MD5 6fce0b626e1dd4fb3c422c35c7345c35
BLAKE2b-256 ca05d88c56e5d6cd7ee5dd632760f3673ad0dba891540ccd585e4348a030da22

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradlog-0.1.1-py3-none-any.whl:

Publisher: publish-sdk.yml on verynewusername/gradlog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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