spacr.qt.screens.activation¶
Activation-map workflow embedded in the Classify screen.
The activation workflow remains distinct from classifier training: it
uses its own settings form, Run action, console, and hyperparameter-search
key, and spacr.qt.bridge.resolve_pipeline_entry() dispatches it to
generate_activation_map. The Classify masthead opens that workflow as a
folded page so attribution results remain associated with the trained model
without combining the two pipeline runs.
ExplainNavigator routes requests from the Explain CV Model page to
the same folded activation page. The aliases in NAV_KEYS cover the
pipeline key, command alias, and navigation spelling without constructing a
second screen or duplicating its settings and job state.
Classes¶
The host handed to Classify's Explain CV page. |
Functions¶
|
Push |
|
The module's own screen, wired the way its sidebar row wired it. |
|
The fold host |
|
Show the activation page on |
|
Return the activation-page opener registered on |
Module Contents¶
The host handed to Classify’s Explain CV page.
Explain CV Model sends the user on in one place – “Open Activation Maps” – and does it by calling
host._on_train_requested. Standing in for the window there is what lets that button land on the page beside it instead of on a key nothing knows, and it costs the explanation screen nothing: anything that is not a request for the activation maps is forwarded to the real window unchanged.A plain object rather than a
QObject: it is reached by attribute access only, and the page holds it, so it lives exactly as long as the page that uses it.- Parameters:
window – the main window, when it can be navigated through – see
spacr.qt.screens.classify._navigable().
Record the window the explanation page will be opened on.
- Parameters:
window – the host window; the page itself is attached later, once it exists.
Remember the page, so the host it lands on can be found later.
- Parameters:
page – the activation page widget, stored as
page.
- spacr.qt.screens.activation.apply_seed(screen: PySide6.QtWidgets.QWidget | None, values: Dict[str, Any]) None[source]¶
Push
valuesintoscreen’s settings form.The rule
MainWindow._on_train_requestedapplies, asked of the same function rather than written out a second time: a navigation that seeded differently from the sidebar’s would be a second answer to one question. A key with no widget is skipped, as it is there.- Parameters:
screen – the screen whose
_settings_modelwidgets are set; None, or a screen without a settings model, does nothing.values – setting name to value; each is applied to the widget of that name, and names with no widget are skipped.
- spacr.qt.screens.activation.build(host_window: PySide6.QtWidgets.QWidget | None = None) PySide6.QtWidgets.QWidget[source]¶
The module’s own screen, wired the way its sidebar row wired it.
- Parameters:
host_window – the main window, when there is one to connect to.
- Returns:
the settings-driven screen for
APP_KEY, with its host connections – “Explain error” and “Run on a cluster” – made.
- spacr.qt.screens.activation.host_of(widget: PySide6.QtWidgets.QWidget | None) PySide6.QtWidgets.QWidget | None[source]¶
The fold host
widgetis sitting on, or None.Walks up from a folded page to the screen whose strip can open the activation maps. Derived from the widget tree rather than handed in, because the page is built before it is mounted – and because a page that ended up in a window instead (the fold’s last resort) has no such host above it, which is exactly what None says.
- Parameters:
widget – the widget to start from, usually a folded page; None gives None.
- spacr.qt.screens.activation.open_page(host_screen: PySide6.QtWidgets.QWidget | None) PySide6.QtWidgets.QWidget | None[source]¶
Show the activation page on
host_screenand raise it.- Parameters:
host_screen – the screen that may carry the activation fold’s opener; None gives None.
- Returns:
the module’s screen, or None when this host carries no activation fold.
- spacr.qt.screens.activation.opener_on(screen: PySide6.QtWidgets.QWidget | None) Any | None[source]¶
Return the activation-page opener registered on
screen, if present.The opener is owned by the host screen. Reusing it ensures that masthead actions and navigation requests address the same folded page and preserve its console, job runner, and settings state.
- Parameters:
screen – Candidate host screen.
- Returns:
Matching fold opener, or
None.