Skip to content

feat: added metrics to the logger#133

Merged
Darinochka merged 1 commit intodevfrom
feat/log-metrics
Feb 18, 2025
Merged

feat: added metrics to the logger#133
Darinochka merged 1 commit intodevfrom
feat/log-metrics

Conversation

@Darinochka
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@voorhs voorhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо чтобы вот эта функция возвращала все метрики, потому что потом она вызывается вот тут при создании json с полной сводкой результатов оптимизации

@Darinochka
Copy link
Collaborator Author

Darinochka commented Feb 18, 2025

@voorhs эта функция уже возвращает все метрики для каждой попытке, но в configs -> node_type -> metrics. ты хочешь чтобы метрики возвращались и для первого уровня, вот так?

{'pipeline_metrics': {'decision_accuracy': 0.7451298701298701,
  'decision_f1': 0.8191895681584316,
  'decision_precision': 0.9451146457274726,
  'decision_recall': 0.7355769230769231,
  'decision_roc_auc': 0.8723449248120302},
 'metrics_target': {<NodeType.regexp: 'regexp'>: [],
  <NodeType.embedding: 'embedding'>: [],
  <NodeType.scoring: 'scoring'>: [0.6150628860603221, 0.9981927966051625],
  <NodeType.decision: 'decision'>: [0.7572427572427572]},
 'metrics': {<NodeType.regexp: 'regexp'>: [],
  <NodeType.embedding: 'embedding'>: [],
  <NodeType.scoring: 'scoring'>: [{'scoring_accuracy': 0.03396603396603397,
    'scoring_precision': 0.004509420151692646,
    'scoring_roc_auc': 0.6150628860603221},
   {'scoring_accuracy': 0.8921078921078921,
    'scoring_precision': 0.9025503300884268,
    'scoring_roc_auc': 0.9981927966051625}],
  <NodeType.decision: 'decision'>: [{'decision_accuracy': 0.7572427572427572}]},
 'configs': {'regexp': [],
  'embedding': [],
  'scoring': [{'module_name': 'linear',
    'module_params': {'embedder_config': {'batch_size': 32,
      'max_length': None,
      'model_name': 'BAAI/bge-reranker-base',
      'device': None,
      'default_prompt': None,
      'classifier_prompt': None,
      'cluster_prompt': None,
      'sts_prompt': None,
      'query_prompt': None,
      'passage_prompt': None,
      'use_cache': False}},
    'metric_name': 'scoring_roc_auc',
    'metric_value': 0.6150628860603221,
    'module_dump_dir': '/home/darinka/AutoIntent/autointent/experiments/runs/test/modules_dumps/NodeType.scoring/linear/comb_0',
    'metrics': {'scoring_accuracy': 0.03396603396603397,
     'scoring_precision': 0.004509420151692646,
     'scoring_roc_auc': 0.6150628860603221}},
   {'module_name': 'linear',
    'module_params': {'embedder_config': {'batch_size': 32,
      'max_length': None,
      'model_name': 'sergeyzh/rubert-tiny-turbo',
      'device': None,
      'default_prompt': None,
      'classifier_prompt': None,
      'cluster_prompt': None,
      'sts_prompt': None,
      'query_prompt': None,
      'passage_prompt': None,
      'use_cache': False}},
    'metric_name': 'scoring_roc_auc',
    'metric_value': 0.9981927966051625,
    'module_dump_dir': '/home/darinka/AutoIntent/autointent/experiments/runs/test/modules_dumps/NodeType.scoring/linear/comb_1',
    'metrics': {'scoring_accuracy': 0.8921078921078921,
     'scoring_precision': 0.9025503300884268,
     'scoring_roc_auc': 0.9981927966051625}}],
  'decision': [{'module_name': 'threshold',
    'module_params': {'thresh': 0.5},
    'metric_name': 'decision_accuracy',
    'metric_value': 0.7572427572427572,
    'module_dump_dir': '/home/darinka/AutoIntent/autointent/experiments/runs/test/modules_dumps/NodeType.decision/threshold/comb_0',
    'metrics': {'decision_accuracy': 0.7572427572427572}}]}}

просто тогда дублирование по сути будет одной и той же части

@voorhs
Copy link
Collaborator

voorhs commented Feb 18, 2025

точняк

Я затупил когда написал этот комментарий. Действительно, в ключе configs уже метрики все сохраняются. Получается, что все ок в этом пр

@Darinochka Darinochka merged commit 8fd616d into dev Feb 18, 2025
22 checks passed
@Darinochka Darinochka deleted the feat/log-metrics branch February 18, 2025 16:48
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.

2 participants