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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gradlog-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5c83c47a78f2d988bd278e814a89e314b1a22c512f47158696729fdee7aa6db5
MD5 2cb26e56ecca4c22ecb84565d1bda3e2
BLAKE2b-256 9b7449bdda99a46d69b7f915c6f5c53b0579e9fc0869c2edc9b778cb0dea2d53

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gradlog-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 331c8d449f11b962e9ad77db64b76c4535fb7c630aca90eee8b9f59cb96bf7e9
MD5 942986e31cad3695790dd0509a499154
BLAKE2b-256 b4efe332f6aa09b0347ecc4c46e6a98bed64d796a8c1e3f14c98c19690b14f20

See more details on using hashes here.

Provenance

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