Removed wrong docstrings for Metric update method's input type #2849
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2054
Description:
Removed input form
{'y_pred': y_pred, 'y': y, ...}
from docstrings and fromdocs/source/metrics.rst
for theignite.Metric.update
methods as Wrong docstrings for Metricupdate
method's input type #2054 suggested, since the code does not support this input form.Added descriptions of update method's accepted input form and
output_transform
's usage in docstrings forignite.Metric.PSNR
andignite.Metric.SSIM
.Fixed a bug in ignite.metric.metric.py's CustomMetric example (line 172).
Question: There exist two types of function signatures for update methods that take
(y_pred, y)
as their inputs:def update(self, output: Sequence[torch.Tensor]) -> None:
, anddef update(self, output: Tuple[torch.Tensor, torch.Tensor]) -> None:
(in EpochMetric)Should this be made consistent somehow? I think the first option would allow users to pass either a
tuple
or alist
as the input, whereas the second option will ask the input to stick to thetuple
type.Check list: