Skip to content

Nano: pytorch val and test metric logs has wrong format in LightningModuleFromTorch #4878

Open
@shane-huang

Description

@shane-huang

Problem:

The current log will output something like val_function_0 while it should be val_mean_squared_error_0.

Solution:

"val/{}_{}".format(type(metric).__name__, i) use the name of the type of metric (metric is an instance of torchmetrics.metric.Metric so the type of it is function), that's why the output looks like val_function_0. It should use the name of the metric itself, i.e. metric.__name__.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions