MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

Consider enhancing get_train_stats()

Open holgerroth opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, the Trainer's get_train_stats() function is returning a fixed set of stats

    def get_train_stats(self) -> dict[str, float]:
        return {"total_epochs": self.state.max_epochs, "total_iterations": self.state.epoch_length}

Describe the solution you'd like Make it configurable true input arguments.

Describe alternatives you've considered Alternatively, anyone needing train stats could access trainer.state directly. However, having a general get_train_stats() call might have more utilities.

Additional context Training stats could be useful in contexts such as federated learning.

holgerroth avatar Jun 22 '22 15:06 holgerroth

I agree with @holgerroth

More general and flexible stats collector is needed in order to support a large variety of single and multimodal trainers.

drmhrehman avatar Jun 22 '22 16:06 drmhrehman

I will try to enhance the get_train_stats API with more flexible fields.

Thanks.

Nic-Ma avatar Aug 03 '22 14:08 Nic-Ma