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.3.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.3-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gradlog-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 126e76e658370d88bfd2f97e06a15b63c0338f3cfe6590a575aa562a9e929625
MD5 7db242f4ec35426cfac5548d6297264e
BLAKE2b-256 a286bdc4bbb3fcd5114019ae12ae2c7659fb328e7204fcf28bdc2b298998c8ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradlog-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: gradlog-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3b245e08c57bdf44dcdf85404e26de695287d165b33bbd68a93986268b366f5f
MD5 d02a791e25d61f1a82cc79d637378e30
BLAKE2b-256 ce9810c7d094b8e44b0c4d91bbaea9b6bbccaef4e91d0ef54e6359da941a28e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradlog-0.1.3-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