Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend support for manual specification of MetricCollection compute_groups #2897

Open
alexrgilbert opened this issue Jan 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@alexrgilbert
Copy link

🚀 Feature

Support incomplete specification of MetricCollection compute_groups + inherit compute groups from child metric collections

Motivation

Currently, new instances of the MetricCollection class allow users to manually specify the compute_groups used to simplify update 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

  1. 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.

  2. 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

@alexrgilbert alexrgilbert added the enhancement New feature or request label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant