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.21.tar.gz (33.3 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.21-py3-none-any.whl (119.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: seetrain_ml-0.1.21.tar.gz
  • Upload date:
  • Size: 33.3 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.21.tar.gz
Algorithm Hash digest
SHA256 fcd2bfebacc439df85d0fbaee59a6a3076efd094ddbf7ffe57d1eb90c36fb3fe
MD5 1f40aac27ce3be1a3a1725fe947a7986
BLAKE2b-256 d7f128ecdf0447a32598a6d483596d716ba99db8094371a601318606aef0673d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seetrain_ml-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 119.5 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.21-py3-none-any.whl
Algorithm Hash digest
SHA256 0d698e98ff15d524b11c46ba08f921778c9b382d0473dac6ef09254ce949a18f
MD5 4f6cef52842c6bfc3594dcaaeb7e5c8f
BLAKE2b-256 ed967dfbe71703b3069c1b09057cba137b52c418dee17ae7c3f0495e0418fc61

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