Skip to content

test(qvae_cell): pin epoch aggregation in evaluation mode - #1434

Open
iloveeyjafjalla wants to merge 1 commit into
qboson:mainfrom
iloveeyjafjalla:codex/r72-run-epoch
Open

iloveeyjafjalla wants to merge 1 commit into
qboson:mainfrom
iloveeyjafjalla:codex/r72-run-epoch

Conversation

@iloveeyjafjalla

Copy link
Copy Markdown

目的

Trainer.run_epoch averages the loss/KL/reconstruction metrics over batches and skips the BM phase when training is off; nothing pins the aggregation or the untouched optimizers.

改动

  • tests/test_qvae_cell_run_epoch.py(新增 1 个用例,桩模型固定 loss=3/kl=1/recon=2,两个“禁止调用”的优化器)
    • 断言 {loss:3, neg_elbo:3, kl:1, recon_loss:2, bm_loss:0}。

验证

  • 基线:1 passed;
  • 变异:value / len(loader) → /(len(loader)+1)(锚点唯一)→ 1 failed;随后还原;
  • 测试 pylint -E 10.00/10。

文档

测试即契约(见各用例 docstring)。

查重

AI 辅助说明

本次改动在 AI 辅助下完成(ZCode),断言与实现逐行核对。

Closes #1433

Trainer.run_epoch averages the loss/KL/reconstruction metrics over batches and skips the BM phase when training is off; nothing pins the aggregation or the untouched optimizers.
Copilot AI balanced review requested due to automatic review settings October 24, 2026 04:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(qvae_cell): pin epoch aggregation in evaluation mode

2 participants