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.8.tar.gz (8.0 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.8-py3-none-any.whl (113.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: seetrain_ml-0.1.8.tar.gz
  • Upload date:
  • Size: 8.0 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.8.tar.gz
Algorithm Hash digest
SHA256 5c88aa2adf730463b36b2b7184484ffff5607a4fe9b64cb668c3284e5b5111ca
MD5 cfa621bf206c20659d16902a489c4c32
BLAKE2b-256 6b66bead98680c750dbf66710897476dec3d0ee453f323644a213fcc63620a77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seetrain_ml-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 113.7 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8b84747038dacaafb81669478b6b009612552e54fcc266185d8fb030031cad3c
MD5 d91300cabe2f5e337bbe223a2d3eb70b
BLAKE2b-256 8cf94247341383306891f994ff0c91b9d9b5fdad49ad3cbacbbb36b6b94cfbae

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