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

Uploaded Python 3

File details

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

File metadata

  • Download URL: seetrain_ml-0.1.14.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.14.tar.gz
Algorithm Hash digest
SHA256 e03737c54e0fd027d82af627f1434b8a481816195f21c7ff7a4a0bd980ed6ec3
MD5 cca462d0fcba91ae2bb6bf63d461cb1e
BLAKE2b-256 a6312a6f30814446ab9aa734c268e715debc68e1512eb93c9f6985c4cf76f9b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seetrain_ml-0.1.14-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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e2da9f3e5e22297c1625614c5a16f5c0e67fd5440ddafbc728d6664d009787
MD5 eabd4998097e8e92f523ead0fdd732e7
BLAKE2b-256 ace8dafb5141aaaebc3f2d49c2882313f59eb549ba03a93d9a70199a9e60002b

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