class_docstr: Metric to keep track of slot F1.
  
  Keeps track of slot precision and slot recall as running metrics.
class_docstr_tok: ["Metric","to","keep","track","of","slot","F1",".","Keeps","track","of","slot","precision","and","slot","recall","as","running","metrics","."]
code: def __init__(
      self, slot_p: AverageType = None, slot_r: AverageType = None
  ):
      if not isinstance(slot_p, AverageMetric) and slot_p is not None:
          slot_p = AverageMetric(slot_p)
      if not isinstance(slot_r, AverageMetric) and slot_r is not None:
          slot_r = AverageMetric(slot_r)
      self._slot_p = slot_p
      self._slot_r = slot_r
  
file_path: ParlAI/parlai/core/tod/teacher_metrics.py
imports: from typing import Optional, List, Dict, Any
  from parlai.core.metrics import AverageMetric, BleuMetric, F1Metric, Metric, Metrics
label_desc: Use image node_id 2 to create a new SlotF1Metric object from inherited base classes: Metric with example: obj = SlotF1Metric(slot_p, slot_r)