Skip to content

Re-organize QualityControl.tags as a dict #1638

@dbirman

Description

@dbirman

The current implementation of tags: list[str] doesn't work the way we intended it to. We wanted people to tag metrics with things like ["probeA", "motion-correction"], ["probeB", "spike-sorting"], etc. In practice in the QC portal this ends up being a problem, because we can't "see" that "probeA" and "probeB" are the same "thing" and can be used to hierarchically group metrics.

What we really want is to let users group the metrics in a hierarchy, where for example if they choose the grouping elements to be:

  • probe
    • metric-type

Then what they see in the portal is:

  • ProbeA
    • Motion Correction
    • Spike Sorting
    • Raw LFP
    • etc...
  • ProbeB
    • Motion Correction
    • Spike Sorting
    • Raw LFP
    • etc...

The hierarchy would be user-configurable to let them look at motion correction across all probes, etc.

David and I discussed re-organizing tags as key:value pairs in a dictionary to make this possible. So users would need to give us a dictionary like

{
  "probe": "ProbeA",
  "metric-type": "Motion Correction"
}

To get the structure I'm showing above. On the plus side we're catching this before a lot of QC has been run in v2, unfortunately this is a breaking change. I don't know how to make this non-breaking unfortunately. For metrics that only have a single tag you can convert them to look like:

{
  "tag": "<old-tag",
  "name": "name"
}

Which then allows you to group by tag and then name hierarchically to get the same view that we currently have.

For the upgrader this is a tiny bit easier, we can generate the keys from the evaluations and the type from the metric names so that at least you can still get the hierarchy that used to show up in the original portal:

  • evaluation
    • metric

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions