Skip to content

Fix validation epoch metadata for visual backends - #1693

Open
dgexplores wants to merge 2 commits into
open-mmlab:mainfrom
dgexplores:fix/wandb-epoch-axis
Open

Fix validation epoch metadata for visual backends#1693
dgexplores wants to merge 2 commits into
open-mmlab:mainfrom
dgexplores:fix/wandb-epoch-axis

Conversation

@dgexplores

Copy link
Copy Markdown

Summary

  • include the validation epoch in the scalar payload when log_metric_by_epoch=True
  • add regression coverage for the epoch-based validation logging path

This lets visualization backends such as WandbVisBackend define an epoch-based x-axis from the emitted scalar metadata. The scalar step remains unchanged.

Fixes #1692.

Validation

  • pytest tests/test_hooks/test_logger_hook.py -q7 passed
  • git diff --check → passed

The focused test run emitted existing PyTorch deprecation warnings only.

@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@dgexplores
dgexplores marked this pull request as ready for review August 14, 2026 20:51
@dgexplores

Copy link
Copy Markdown
Author

Hi @nfcampos @hwchase17 @sydney-runkle,

This PR addresses mmengine issue for validation epoch metadata in visual backends (WandB).

Changes made:

  • mmengine/hooks/logger_hook.py: Added tag['epoch'] = epoch line
  • tests/test_hooks/test_logger_hook.py: Added regression test test_after_val_epoch

The fix ensures epoch data is properly captured during validation loops for visual backends.

Following OpenMMLab contributing guidelines, this PR is ready for review.

  • Fix validates epoch metadata that was previously lost
  • Test coverage added for sync validation loop
  • Minimal changes - only 2 files modified (+7 total lines)

Thank you for reviewing!

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.

[Bug] WandbVisBackend can't set the X‑axis to epoch, because LoggerHook does not consistently pass the epoch value

2 participants