raise ValueError(f"Invalid metric name: {name}!")
if typ not in self.metric_types:
raise ValueError(f"Invalid metric type: {typ}!")
raise ValueError(f"Invalid metric name: {name}!")
if typ not in self.metric_types:
raise ValueError(f"Invalid metric type: {typ}!")