Extend support for manual specification of MetricCollection compute_groups
#2897
Labels
enhancement
New feature or request
compute_groups
#2897
🚀 Feature
Support incomplete specification of MetricCollection
compute_groups
+ inherit compute groups from child metric collectionsMotivation
Currently, new instances of the
MetricCollection
class allow users to manually specify thecompute_groups
used to simplifyupdate
steps. However, if a user doesn't explicitly specify any metric in the compute groups lists, it simply won't be updated. It seems like the expected behavior would be for those additional metrics to simply be updated normally (or possibly automatically inherited by some of the manually specified groups).Moreover, if a uses the supported behavior of a single level "recursion" of MetricCollection's (i.e. creating a MetricCollection of MetricCollection's), the
compute_groups
arguments of the child collections are simply ignored.Pitch
It might be desirable to have any metrics which aren't included in the list of
compute_groups
to be automatically detected and put into their own single-item compute groups. Possibly we could also attempt to merge them into existing groups, but this might be overly complex and unnecessary.The specified compute groups from child collections should be inherited by the parent (with the prefix's/postfix's updated appropriately). Admittedly, this introduces some complexities which may be more simply handled by just automatically creating the groups (as is currently done). If so, it should at least be documented that the child
compute_groups
arguments will be ignored.Alternatives
As noted above, if the current behavior is intended, it should at least be documented what will happen in these "corner" cases.
Additional context
The text was updated successfully, but these errors were encountered: