You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use MetricCollection to store similar metrics, the compute_groups feature will automatically merge the states without any warning. I have two similar metrics "star classification accuracy" and "galaxy classification accuracy" whose only difference is a string attribute source_type_filter ("star" v.s. "galaxy") which instructs them to conduct different filter behaviors. During validation, i find that "star classification accuracy" is always equal to "galaxy classification accuracy" because MetricCollection merges their states.
To Reproduce
I attach my hydra config file here to show my env:
Hi @YicunDuanUMich, sorry for the late reply.
I am pretty sure that the bug you are seeing was fixes in later versions of torchmetrics. In particular I think this PR probably contains the solution for your issues: #2571.
Just as an example, here is a script that initializes the classification metric precision with both average="macro" and average="weighted" e.g. two metric where there states are the same and they only differ how values are aggregated in the end.
In v0.11.3 of torchmetrics I am seeing somewhat the same behavior you are describing, that the second metric is not being updated correctly. However in the newest version of torchmetrics things are working as expected.
Therefore, please update to the newest version of torchmetrics.
Closing issue.
🐛 Bug
When I use
MetricCollection
to store similar metrics, thecompute_groups
feature will automatically merge the states without any warning. I have two similar metrics "star classification accuracy" and "galaxy classification accuracy" whose only difference is a string attributesource_type_filter
("star"
v.s."galaxy"
) which instructs them to conduct different filter behaviors. During validation, i find that "star classification accuracy" is always equal to "galaxy classification accuracy" becauseMetricCollection
merges their states.To Reproduce
I attach my hydra config file here to show my env:
Expected behavior
The default value of
compute_groups
inMetricCollection
isFalse
Environment
conda
,pip
, build from source): 0.11.3Additional context
The text was updated successfully, but these errors were encountered: