Repository navigation
feat: add Histogram API reference - #390
Merged
Merged
Conversation
新增 Histogram 中英文 API 文档,说明参数、分桶规则、数据校验及 NumPy、PyTorch 使用示例。 补充 API 索引、log 页面和侧边栏入口。
直方图页面更新三处描述: - PyTorch Tensor 可直接传入 sequence,SDK 自动执行 detach().cpu() 转换, GPU、带梯度与 bfloat16 精度均受支持,示例代码改为直接传入 layer.weight.flatten() - num_bins 经由关键字参数接收,仅在 bins 未指定时生效,两者同时给出时 以 bins 为准并产生警告,其余未识别的关键字参数会被忽略 - 类型与形状错误的输入在构造时不再抛出异常,SDK 打印警告并将实例标记 为无效,swanlab.log() 记录时跳过该条指标;数值与参数组合错误仍然 抛出 ValueError;属性表新增 is_valid
Ji11
marked this pull request as draft
November 6, 2026 03:22
Ji11
marked this pull request as ready for review
November 6, 2026 03:23
* feat: add histogram cli * feat: add en version histogram cli * fix: openapi definition * chore: update legacy column note
Nexisato
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
新增
swanlab.Histogram中英文 API 文档,介绍原始样本与预分桶输入、参数优先级、桶数和边界限制、异常行为,以及 NumPy、PyTorch 使用示例。补充 API 索引、log 页面和侧边栏入口。