Skip to content
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

two metric with the same name looks not possible (UNIQUE constraint failed) #155

Open
mhow2 opened this issue Jun 6, 2019 · 3 comments
Open

Comments

@mhow2
Copy link

mhow2 commented Jun 6, 2019

qmodel_OW2-MRL_CMR-v0.1.json.txt

In the above model (renamed to .txt), if I rename the metric Unanswered Bugs-3 at MRL_Quality > Quality_Unanswered_Bugs_CMR to Unanswered Bugs-2, I get an error UNIQUE constraint failed: prosoul_metric.name

I think it is somehow because Unanswered Bugs-2 already exists somewhere in the model. But yet, it should be possible to have several metric with the same name in others attributes, isn't ?

@mhow2 mhow2 changed the title two metric with the same name looks not possible two metric with the same name looks not possible (UNIQUE constraint failed) Jun 7, 2019
@mhow2
Copy link
Author

mhow2 commented Jun 7, 2019

It doesn't seem only related to the current model, but against all models that are loaded in the system.
For instance, if you import the following two models one after another, you'll have the same error message and the import will fail.
qmodel_OW2-MRL_CMR-v0.1.2.json.txt
qmodel_OW2-MRL_CMR-v0.1.5.json.txt

@dlumbrer
Copy link
Contributor

dlumbrer commented Jun 7, 2019

The error is due to the fact that the unique id of a metric is its name. If there is more than one Metric with the same name, it could produce errors in the assessment process or in the dashboards.

So I think that the quickest and easiest way is to change the name of the Metrics when necessary.

Thanks!

@mhow2
Copy link
Author

mhow2 commented Jun 7, 2019

Ok, but is the uniqueness consider others models that are loaded in prosoul ? It seems to, and if yes, I don't understand why.
Generally speaking, from the user perspective, you can have a same exact metric (name and data) used in several - but still different - attributes (and in several models loaded). At least it is how we have understood it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants