-
Notifications
You must be signed in to change notification settings - Fork 191
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
Avoid duplicated template and quality metric names #2210
Avoid duplicated template and quality metric names #2210
Conversation
@@ -60,7 +60,7 @@ def _set_params( | |||
metric_names += get_multi_channel_template_metric_names() | |||
metrics_kwargs = metrics_kwargs or dict() | |||
params = dict( | |||
metric_names=[str(name) for name in metric_names], | |||
metric_names=[str(name) for name in np.unique(metric_names)], |
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.
If this is a list maybe you can use set?
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.
e.g: {str(name) for name in metric_names}
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.
well it needs to be a list!
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.
Yeah, it could also be:
[[str(name) for name in set(metric_names)]
But it probably does not matter for this size anyway : )
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.
Otherwise, looks good to me. Simple change. Was it causing any trouble?
yes, especially if you use |
In principle, the user can set duplicated metrics name. This simple PR makes a unique of the metric names to avoid duplication in the output dataframes