Skip to content

Fix Plot2d as PlotLosses output (issue #137)#151

Merged
stared merged 1 commit intomainfrom
fix-i137-set-output-mode
May 4, 2026
Merged

Fix Plot2d as PlotLosses output (issue #137)#151
stared merged 1 commit intomainfrom
fix-i137-set-output-mode

Conversation

@stared
Copy link
Copy Markdown
Owner

@stared stared commented May 4, 2026

BaseSubplot now implements set_output_mode, so Plot2d (and siblings) no longer raise AttributeError when passed as a PlotLosses output.

Plot2d.send manages its own figure/axes and clears between sends instead of stacking contour/scatter layers each epoch. Notebook vs script mode is honoured via a shared _present helper.

Plot2d.send also calls self.predict, so the example notebook's plot2d.predict = plot2d._predict_pytorch monkey-patch (and any user override) actually takes effect.

@stared stared mentioned this pull request May 4, 2026
BaseSubplot now implements set_output_mode, so Plot2d (and siblings)
no longer raise AttributeError when passed as a PlotLosses output.

Plot2d.send manages its own figure/axes and clears between sends
instead of stacking contour/scatter layers each epoch. Notebook vs
script mode is honoured via a shared _present helper.

Plot2d.send also calls self.predict, so the example notebook's
plot2d.predict = plot2d._predict_pytorch monkey-patch (and any user
override) actually takes effect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stared stared force-pushed the fix-i137-set-output-mode branch from a627f9e to 53d1479 Compare May 4, 2026 10:40
@stared stared merged commit 3de0810 into main May 4, 2026
5 of 6 checks passed
@stared stared deleted the fix-i137-set-output-mode branch May 4, 2026 10:58
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.

1 participant