sync: ml-ui-connection delta specs to main specs
This commit is contained in:
parent
9a549b8c7a
commit
c0f5654450
15 changed files with 369 additions and 6 deletions
|
|
@ -63,7 +63,7 @@ The system SHALL allow users to toggle visibility of individual pattern labels v
|
|||
- **THEN** all "double_bottom" predictions are hidden from the chart
|
||||
|
||||
### Requirement: Prediction controls panel
|
||||
The system SHALL display a prediction controls panel in the sidebar with: master on/off toggle, model info (name, version, type, training date), action buttons ("Run on Visible", "Predict All"), auto-predict toggle, confidence threshold slider, label checkboxes with per-class precision/recall metrics, prediction count, agreement count, and a "Show only disagreements" filter.
|
||||
The system SHALL display a prediction controls panel in the sidebar with: master on/off toggle, model selector dropdown (listing available trained models), model info (name, version, type, training date), action buttons ("Run on Visible", "Predict All"), auto-predict toggle, confidence threshold slider, label checkboxes with per-class precision/recall metrics, prediction count, agreement count, and a "Show only disagreements" filter.
|
||||
|
||||
#### Scenario: Display model info
|
||||
- **WHEN** the prediction panel loads and the inference API is available
|
||||
|
|
@ -77,6 +77,10 @@ The system SHALL display a prediction controls panel in the sidebar with: master
|
|||
- **WHEN** model info includes per-class metrics
|
||||
- **THEN** each label checkbox shows precision and recall values (e.g., "bull_flag (P:0.89 R:0.76)")
|
||||
|
||||
#### Scenario: Model selector integrated
|
||||
- **WHEN** the prediction panel renders with trained models available
|
||||
- **THEN** a model selector dropdown appears above the action buttons, allowing the user to switch the active model
|
||||
|
||||
### Requirement: Disagreement detection
|
||||
The system SHALL compare human annotation spans with model prediction spans to identify disagreements. For each human annotation, check if any prediction span overlaps (>50% time overlap). Disagreement types: "missed_by_model" (human annotated, model predicted "O"), "missed_by_human" (model predicted pattern, no human annotation), "label_mismatch" (both see a pattern but different labels).
|
||||
|
||||
|
|
@ -118,6 +122,17 @@ When a user clicks on a "missed_by_human" prediction, the system SHALL open the
|
|||
- **WHEN** user clicks a "missed_by_human" prediction and clicks "Not a pattern"
|
||||
- **THEN** the system saves a negative annotation with label "O", source "human_correction", and records the model's original prediction and confidence
|
||||
|
||||
### Requirement: Prediction cache invalidation on model change
|
||||
The system SHALL cache predictions in memory keyed by `${pair}_${timeframe}_${startTime}_${endTime}_${modelVersion}`. When the user scrolls to a range with cached predictions, the system SHALL use the cache instead of re-fetching. Cache SHALL be invalidated when the model version changes OR when the user switches models via the model selector.
|
||||
|
||||
#### Scenario: Cache hit
|
||||
- **WHEN** user scrolls back to a previously predicted range with the same model version
|
||||
- **THEN** the system renders cached predictions without making an API call
|
||||
|
||||
#### Scenario: Cache invalidation on model switch
|
||||
- **WHEN** the user switches to a different model via the model selector
|
||||
- **THEN** all cached predictions are cleared and the chart removes displayed predictions
|
||||
|
||||
### Requirement: Inference API connection monitoring
|
||||
The system SHALL poll `/api/model/info` every 30 seconds when the inference API is unavailable. When the API becomes available, the system SHALL auto-reconnect and enable prediction controls. Human annotation SHALL never be blocked by inference API availability.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue