-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Align metrics #30
Conversation
Codecov ReportAttention: Patch coverage is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think the exceptions to the inverse mapping from metric
to string can be set in the respective backends, but that's not a blocker for me.
e.g.,
class Backend:
inverse_metric_mapping = {Metric.EUCLIDEAN: "l2"}
You can then find a generalizable solution in the form of a method on the base class:
def _map_metric_to_string(self, metric: Metric) -> str:
return self.inverse_metric_mapping.get(metric, metric.value)
No description provided.