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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gradlog-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1b8e9609f6a4c77dbb6ec7ea2950ca2314597ad812716ac954c064ce1a58d622
MD5 4ad1465baacf7ce59aad8691bdf3f7a5
BLAKE2b-256 6ea40060c8e6c85eccbd9e35588c5aa130e14514917107b05140723c85d8322d

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for gradlog-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f95ece49ef8b7c084c86e9519a61e71783887815a14fa74da7a5686267032299
MD5 185326508134ca7c639860ad1faa63e4
BLAKE2b-256 6eca168c2af13ece57372630891214ea3d6e8af731ffcfe9d7c0208c5708a785

See more details on using hashes here.

Provenance

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