Skip to main content

深度学习实验跟踪工具

Project description

SeeTrain

SeeTrain 是一个深度学习实验跟踪和框架集成工具,提供统一的接口来适配各种深度学习框架,实现无缝的实验管理和数据记录。

注意: 本包在 PyPI 上的名称为 seetrain-ml,请使用 pip install seetrain-ml 进行安装。

✨ 特性

  • 📊 统一实验跟踪 - 提供一致的 API 来记录指标、图像、音频、文本等多媒体数据

🚀 快速开始

安装

pip install seetrain-ml

验证安装

import seetrain
print(f"SeeTrain version: {seetrain.__version__}")
print("SeeTrain 安装成功!")

基本使用

import time
import random
import seetrain

# 初始化实验
seetrain.init(
    config={ # 选填
        "learning_rate": 0.02,
        "architecture": "resnet56",
        "dataset": "fish",
        "epochs": 10  # 建议要填
    }
)


# 记录多媒体类型
seetrain.log({
    "Preview/image": seetrain.Image(data_or_path="fw658.webp"),
    "Preview/video":  seetrain.Video(data_or_path="IMG_3010.MOV"),
    "Preview/audio": seetrain.Audio(data_or_path="6.m4a", sample_rate=44100, caption="测试音频")
    },
    epoch=1)
    
epochs = 10
offset = random.random() / 5
for epoch in range(1, epochs):
    acc = 1 - 2 ** -epoch - random.random() / epoch - offset
    loss = 2 ** -epoch + random.random() / epoch + offset
    # 记录训练指标
    seetrain.log({
        "train/acc": acc, 
        "train/loss": loss,
        "Preview/text": seetrain.Text("Hello, World!")
        }, epoch=epoch)
    time.sleep(1)

seetrain.finish()

记录训练指标数据

支持两种调用方式:
  • 1.字典方式: log({"loss": 0.5, "acc": 0.95}, epoch=100)
  • 2.键值对方式: log("loss", 0.5, epoch=100)
Args:
  • data: 指标数据字典 或 指标名称(字符串)
  • value: 指标值 (仅在 data 是字符串时使用)
  • step: 训练步数 (可选)
  • epoch: 训练轮数 (可选)
  • print_to_console: 是否打印到控制台
Examples:
  • 字典方式
    • seetrain.log({"loss": 0.5, "acc": 0.95}, step=100)
    • seetrain.log({"image": Image("path/to/image.jpg")}, step=1)
  • 键值对方式
    • seetrain.log("train/loss", 0.5, step=100)
    • seetrain.log("train/acc", 0.95, step=100)

⚠️ 通过 “/” 实现指标分组展示

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

seetrain_ml-0.1.15.tar.gz (33.2 MB view details)

Uploaded Source

Built Distribution

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

seetrain_ml-0.1.15-py3-none-any.whl (115.8 kB view details)

Uploaded Python 3

File details

Details for the file seetrain_ml-0.1.15.tar.gz.

File metadata

  • Download URL: seetrain_ml-0.1.15.tar.gz
  • Upload date:
  • Size: 33.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for seetrain_ml-0.1.15.tar.gz
Algorithm Hash digest
SHA256 f855f5608659aecdbab7a5cd9a09853ab0dca0d5148646d1f18af9b3d27ef54f
MD5 b0ce56c617039a7a9ae0461b6a2ff7dc
BLAKE2b-256 106bf3a34e88b0255d89a7e02b921fc9b9542424e7ffac888724f125d1ff2079

See more details on using hashes here.

File details

Details for the file seetrain_ml-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: seetrain_ml-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 115.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for seetrain_ml-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 d54fbd6c52b697d482a617d2fa7b7ca3d30fbff6b5d107225271ffbcd24b6fa7
MD5 5b3f7e9f7540bff047812299331e2761
BLAKE2b-256 b2e41d4b2f0e40ae262a5d5c798bd542e04ab7f02bfa49ac18305554fa721900

See more details on using hashes here.

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