swanlog for Openclaw

A specialized utility to sync SwanLab cloud experiments, including metrics and configurations, directly to a local directory for offline inspection.

jasonwei1002
v1.0.0
Apr 29, 2026
0
651
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install swanlog

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install swanlog using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is swanlog?

The swanlog skill provides a seamless bridge between the SwanLab cloud platform and your local development environment. By leveraging Openclaw Skills, users can instantly download experiment data, scalar metrics, and environment configurations in a structured format. This tool is essential for developers who need to perform deep dives into training runs, compare experimental results, or archive metrics without constant internet access or reliance on the web interface.

It functions as a robust wrapper around the SwanLab API, automating the process of authentication, profile extraction, and data formatting. Instead of manually navigating a dashboard, developers can use this skill within their AI agent environment to bring remote insights directly into their local workspace for immediate processing and visualization.

swanlog Use Cases

  • Syncing the latest training metrics to a local laptop for offline analysis.
  • Archiving specific experiment IDs to maintain a permanent local record of ML runs.
  • Performing local diffs between different SwanLab experiments to identify performance regressions.
  • Fetching run data when remote access to GPU clusters is restricted but cloud API access is available.
  • Generating a quick local summary of experiment progress using the auto-generated brief.md.

How swanlog Works

  1. The skill identifies the target SwanLab project and experiment ID (or defaults to the latest run).
  2. It invokes a Python extraction script that authenticates via the SwanLab API and pulls comprehensive run data.
  3. All scalar metrics are automatically enumerated and exported into a metrics.csv file.
  4. Metadata, including requirements and configurations, are saved into a timestamped directory named after the run.
  5. A brief.md file is generated locally, providing a snapshot of the latest non-NaN values for every logged metric.
  6. The skill outputs the path to the synchronized data and summarizes the key findings for the user.

swanlog Setup

Prerequisites

Ensure you have the necessary dependencies installed in your environment to use this within Openclaw Skills:

pip install swanlab>=0.7.15 pandas omegaconf

Authentication

You must be logged into SwanLab via the CLI for the extraction script to function:

swanlab login

Configuration

While not strictly required, setting your project name as an environment variable can simplify the process:

export SWANLAB_PROJECT="your_project_name"

swanlog Data Schema & Taxonomy

The skill organizes fetched data into a directory named swanlog_<YYYY-MM-DD_HH-MM-SS>/ with the following structure:

File Name Description
metrics.csv A flat table containing all scalar metrics (float/int) logged during the run.
brief.md A summary document containing run metadata and the latest values for all scalars.
config.yaml The hyperparameter and environment configuration used for the experiment.
requirements.txt The list of dependencies captured at the time of the training run.

swanlog Advanced Features

  • Automatic metric enumeration: No need to manually specify keys; the skill pulls all logged scalars by default.
  • Idempotent syncing: Re-running the skill for the same experiment updates existing files rather than creating duplicates.
  • Flexible scoping: Supports fetching specific experiment IDs or the latest run from a named project.
  • Local summary generation: Automatically produces a Markdown brief for instant readability within Openclaw Skills.
  • CLI-friendly output: Designed to be easily integrated into larger bash-based automation pipelines.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*