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 some classes are instantiated with superclass arguments as kwargs, the superclass constructor receives multiple values for these arguments and instantiation fails with an error like:
TypeError: torchmetrics.classification.stat_scores.StatScores.__init__() got multiple values for keyword argument 'reduce'
This happens for the following classes:
Accuracy
Dice
JaccardIndex
Precision
Recall
Specificity
To Reproduce
Instantiate Accuracy, Dice, Precision, Recall or Specificity specifying the argument reduce or mdmc_reduce as kwarg, or the class JaccardIndex with the normalize argument as kwarg.
🐛 Bug
When some classes are instantiated with superclass arguments as kwargs, the superclass constructor receives multiple values for these arguments and instantiation fails with an error like:
TypeError: torchmetrics.classification.stat_scores.StatScores.__init__() got multiple values for keyword argument 'reduce'
This happens for the following classes:
To Reproduce
Instantiate Accuracy, Dice, Precision, Recall or Specificity specifying the argument
reduce
ormdmc_reduce
as kwarg, or the class JaccardIndex with thenormalize
argument as kwarg.Code sample
Expected behavior
The class should be instantiated prioritizing values provided as kwargs, instead of default values generated inside the constructor.
Environment
The text was updated successfully, but these errors were encountered: