Repository navigation
[codex] Fix SSIM checkpoint selection and shared metric direction - #183
Conversation
|
Claude finished @jbohnslav's task in 2m 39s —— View job Claude Code Review
This PR correctly fixes the SSIM checkpoint-selection bug and centralizes metric direction ( Findings1.
Verified as correct
No other correctness issues found in the diff. The |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50e9900920
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Fixes #182.
Flow training records SSIM as a loss, but checkpoint selection inferred direction from whether the metric name contained
loss. It therefore saved the highest SSIM loss as the best checkpoint, which downstream feature-extractor training preferentially loads. This change minimizes SSIM while preserving F1 maximization.Metrics now carry a validated
key_metric_mode, shared by checkpoints, learning-rate scheduling, and the existing early-stoppingis_errorflag. The same direction resolver drives Ray ASHA, HyperOpt, and trial selection, and best-epoch confusion plotting. New HDF5 files persist direction; legacy files fall back to known metric names. Custom objectives must supply an explicit min/max override. The public classificationget_metrics()factory accepts and forwardskey_metric_mode, with min/max and default-direction regression coverage.The audit also found that early stopping minimized classification F1 and could crash on its first non-improving score. Both are fixed. EmptyMetrics initialization is corrected to preserve loss semantics during automatic tuning.
Validation:
QT_QPA_PLATFORM=offscreen uv run pytest -q --tb=short→ 85 passed, 5 GPU tests deselected.git diff --checkpass.Based directly on master; independent of the Torch/Lightning upgrade in #180. This corrects future checkpoint selection but does not recover previously discarded epochs.
Claude review workflow diagnostics:
401 OAuth access token has been revoked.66d229c.Release and review cadence:
uv lock --checkanduv buildpass, with wheel/sdist metadata verified. Merging into master triggers the existing GitHub Release/PyPI publishing workflow..kdfiles while preserving the existing ignore rule and local ticket data.