fix(frontend): update ModelInfoResponse types to match backend structure

- Update TypeScript types to match flat backend response structure
- Remove nested model_info and metrics objects
- Remove label_config, use labels array and per_class_metrics array
- Update all component references to use new structure
- Generate default colors for prediction labels in CandleChart
- Fix TypeScript type errors for nullable model_version
- Remove accuracy/F1 metrics display (not in new response)
This commit is contained in:
Marko Djordjevic 2026-02-15 21:39:38 +01:00
parent aa81d4f3d0
commit 5a7c901980
95 changed files with 326 additions and 63 deletions

View file

@ -0,0 +1,8 @@
precision recall f1-score support
Bearish Engulfing 0.8065 1.0000 0.8929 25
Bullish Engulfing 1.0000 0.8125 0.8966 32
accuracy 0.8947 57
macro avg 0.9032 0.9062 0.8947 57
weighted avg 0.9151 0.8947 0.8949 57

View file

@ -0,0 +1,97 @@
data:
annotations_path: data/annotations/export.json
enriched_path: data/enriched/features.csv
labeled_path: data/labeled/dataset.csv
raw_path: data/raw/OHLCV.csv
stages:
annotation_ingestion:
context_padding: 20
enabled: true
label_encoding: window
merge_strategy: human_priority
min_confidence: 1
programmatic_labels:
enabled: true
talib_patterns:
- CDLENGULFING
- CDLHAMMER
- CDLINVERTEDHAMMER
- CDLSHOOTINGSTAR
- CDLDOJI
- CDLDOJISTAR
- CDLMORNINGSTAR
- CDLEVENINGSTAR
- CDLHARAMI
- CDLPIERCING
- CDLDARKCLOUDCOVER
- CDL3WHITESOLDIERS
- CDL3BLACKCROWS
window_size: 30
feature_engineering:
candle_features: true
custom_features: []
enabled: true
talib_indicators:
- name: RSI
params:
timeperiod: 14
- name: EMA
params:
timeperiod: 20
- name: EMA
params:
timeperiod: 50
- name: MACD
params:
fastperiod: 12
signalperiod: 9
slowperiod: 26
- name: BBANDS
params:
nbdevdn: 2
nbdevup: 2
timeperiod: 20
- name: ATR
params:
timeperiod: 14
- name: ADX
params:
timeperiod: 14
- name: CCI
params:
timeperiod: 14
- name: MFI
params:
timeperiod: 14
- name: STOCH
params:
fastk_period: 14
slowd_period: 3
slowk_period: 3
inference:
batch_size: 1000
enabled: true
local_model_path: models/best_model.pkl
mlflow_model_name: candlestick_pattern_v1
mlflow_model_stage: Production
model_source: local
use_training_config: true
training:
class_weights: balanced
enabled: true
hyperparameters:
max_depth: 15
min_samples_leaf: 2
min_samples_split: 5
n_estimators: 200
n_jobs: -1
random_state: 42
mlflow:
experiment_name: candlestick_patterns
log_artifacts: true
register_model: false
tracking_uri: http://localhost:5000
model_type: random_forest
split_method: temporal
test_split: 0.2
validation_split: 0.1

View file

@ -0,0 +1,14 @@
artifact_uri: file:///home/homoludens/projekti/bitcon/candle_annotator/services/ml/mlruns/358560345319124639/509970efc3e0494ba3c2fbd7dd24d438/artifacts
end_time: 1771187605319
entry_point_name: ''
experiment_id: '358560345319124639'
lifecycle_stage: active
run_id: 509970efc3e0494ba3c2fbd7dd24d438
run_name: painted-doe-188
source_name: ''
source_type: 4
source_version: ''
start_time: 1771187595858
status: 3
tags: []
user_id: homoludens

View file

@ -0,0 +1,2 @@
1771187597069 0.8947368421052632 0
1771187597069 0.8947368421052632 0

View file

@ -0,0 +1,2 @@
1771187597121 0.8928571428571429 0
1771187597121 0.8928571428571429 0

View file

@ -0,0 +1,2 @@
1771187597155 0.896551724137931 0
1771187597155 0.896551724137931 0

View file

@ -0,0 +1,2 @@
1771187597081 0.8947044334975369 0
1771187597081 0.8947044334975369 0

View file

@ -0,0 +1,2 @@
1771187597191 0.0 0
1771187597191 0.0 0

View file

@ -0,0 +1,2 @@
1771187597090 0.8949312937516204 0
1771187597090 0.8949312937516204 0

View file

@ -0,0 +1,2 @@
1771187597104 0.8064516129032258 0
1771187597104 0.8064516129032258 0

View file

@ -0,0 +1,2 @@
1771187597133 1.0 0
1771187597133 1.0 0

View file

@ -0,0 +1,2 @@
1771187597166 0.0 0
1771187597166 0.0 0

View file

@ -0,0 +1,2 @@
1771187597113 1.0 0
1771187597113 1.0 0

View file

@ -0,0 +1,2 @@
1771187597145 0.8125 0
1771187597145 0.8125 0

View file

@ -0,0 +1,2 @@
1771187597176 0.0 0
1771187597176 0.0 0

View file

@ -0,0 +1,2 @@
1771187596947 1.0 0
1771187596947 1.0 0

View file

@ -0,0 +1,2 @@
1771187596958 1.0 0
1771187596958 1.0 0

View file

@ -0,0 +1,2 @@
1771187596967 1.0 0
1771187596967 1.0 0

View file

@ -0,0 +1,6 @@
destination_id: m-cf12ffc008e047e1a37f58efe209422c
destination_type: MODEL_OUTPUT
source_id: m-cf12ffc008e047e1a37f58efe209422c
source_type: RUN_OUTPUT
step: 0
tags: {}

View file

@ -0,0 +1 @@
aa81d4f3d0dcb9c58799d7bf63fd8fe61006bdce