Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Apr 2, 2025

Clean up usage of InputTransform.unique_name_suffix

  • Don't ever add which automatically, since self._which is added by WrappedStatistic when it determines unique_name
  • Add missing args to some transforms to ensure uniqueness
  • Add unique_name_suffix to ShiftAlongNewDim, since it may take a Dataset arg, and we don't want to just insert this.

* Don't ever add `which` automatically, since `self._which` is added by `WrappedStatistic` when it determines `unique_name`
* Add missing args to some transforms to ensure uniqueness
* Add `unique_name_suffix` to `ShiftAlongNewDim`, since it may take a `Dataset` arg, and we don't want to just insert this.

PiperOrigin-RevId: 743185413
@copybara-service copybara-service bot changed the title Validate transforms in WrappedMetric. This checks that transform.which in transform.unique_name_suffix. This check ideally would be done in the base class, InputTransform.__init__, but cannot because unique_name_suffix is not determined until *after* base class init. Clean up usage of InputTransform.unique_name_suffix Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant