Preserve RangeDim defaults when forming unbounded unions - #2872
Open
dipeshbabu wants to merge 2 commits into
Open
dipeshbabu wants to merge 2 commits into
dipeshbabu wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An in-place union with an unbounded
RangeDimtreats the-1upper-bound sentinel as a numeric limit and resets the left-hand default to the merged lower bound. For example, mergingRangeDim(2, 10, default=7)withRangeDim(0, -1)changes the default from 7 to 0. Even unioning an unbounded range with itself changes its default. SubsequentShapeconstruction then uses the wrong default dimension.Preserve the existing default: a union only widens the accepted range, so a valid default remains valid. This removes the unnecessary clamp without adding allocation or changing bound merging.
Validation:
Shape.default.coremltools.converters.mil.mil.tests, which the configured GitLab MIL job discovers.git diff --checkpassed.Local test command (pytest file logging/cache disabled because sandbox writes were denied):