TorchMetrics v0.9 Released
Version 0.9 of TorchMetrics features major improvements to the internals of the forward method, bringing run speeds up with no code re-writing requirements.
Created on June 2|Last edited on June 2
Comment
Version 0.9 of TorchMetrics has been released, this update being dubbed "Faster forward" because of its focus on significant changes to the forward method.
What's changed in TorchMetrics v0.9?
The main focus here is the forward method, a method used for iterating metrics objects. Within the internal workings of the forward method, versions prior to 0.9 it would call for an update pass twice: once for the current batch and once for the global state. This double-update was actually totally unnecessary for the majority of metrics types, so with version 0.9 the team has done a full sweep on all metrics objects to remedy this redundancy.
Most metrics objects now have a flag set internally to skip the second update. Because this change is fully internal, there's no need for you to change any of your code if you're using built-in metrics objects. However, if you're working with custom metrics classes, since the default behavior is still to double-update, you might want to set the new full_state_update flag for your metric accordingly.
This change alone can, in many cases, double the run speeds for forward method calls.
Beyond the forward method improvements, a handful of smaller additions and bug fixes are present within the update. You can read more about them here: https://github.com/PyTorchLightning/metrics/releases/tag/v0.9.0
Find out more
Add a comment
Tags: ML News
Iterate on AI agents and models faster. Try Weights & Biases today.