Skip to content

[Bug]: long_time_metrics reflect only last batch of data and not the average over all batches #78

@AnnihilatorChess

Description

@AnnihilatorChess

The long_time_metrics saved to time_logs inside the Trainer.validation_loop method are overriden for every batch. This means that the metrics use only the last batch

A fix would be something like this:
# FIX: Accumulate time_logs averages instead of overwriting with |=

                    if k in long_time_metrics or "spectral_error" in k:
                        for key, val in new_time_logs.items():
                            if key in time_logs:
                                time_logs[key] += val / denom
                            else:
                                time_logs[key] = val / denom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions