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

fix: resolve failing test cases for torch.linalg.norm #28805

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

adity1729
Copy link
Contributor

@adity1729 adity1729 commented Aug 18, 2024

PR Description

Related Issue

Close #28690

Closes #

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

Socials

@adity1729 adity1729 changed the title fix(frontend/torch): resolve failing test cases for linalg.norm fix: resolve failing test cases for torch.linalg.norm Aug 18, 2024
Copy link
Contributor

@Sam-Armstrong Sam-Armstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @adity1729, thanks for the contribution!

I think the only problem with the test is the dtype of the returned tensor. Can you make the changes I suggested and confirm that fixes the test? Then we should be good to merge.

Thanks!

ivy/functional/frontends/torch/linalg.py Outdated Show resolved Hide resolved
Comment on lines 76 to 78
max_num_dims=4, # limit maximum dimensions
min_dim_size=2, # set minimum dimension size
max_dim_size=10, # set maximum dimension size
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
max_num_dims=4, # limit maximum dimensions
min_dim_size=2, # set minimum dimension size
max_dim_size=10, # set maximum dimension size

I don't think we need these to fix the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it we need max_num_dims=4 otherwise it is giving this error

E hypothesis.errors.InvalidArgument: ListStrategy(one_of(floats(min_value=-100.0, max_value=-3.097532938251384e-35, allow_nan=False, allow_infinity=False, allow_subnormal=False, width=32), floats(min_value=3.097532938251384e-35, max_value=100.0, allow_nan=False, allow_infinity=False, allow_subnormal=False, width=32)), min_size=45_000, max_size=45_000) can never generate an example, because min_size is larger than Hypothesis supports. Including it is at best slowing down your tests for no benefit; at worst making them fail (maybe flakily) with a HealthCheck error.
E while generating 'args' from _get_axis_and_p()
E

adity1729 and others added 3 commits August 19, 2024 22:22
Co-authored-by: Sam Armstrong <88863522+Sam-Armstrong@users.noreply.github.com>
Co-authored-by: Sam Armstrong <88863522+Sam-Armstrong@users.noreply.github.com>
Copy link
Contributor

@Sam-Armstrong Sam-Armstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@Sam-Armstrong Sam-Armstrong merged commit ee80264 into ivy-llc:main Aug 19, 2024
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.

Fix Frontend Failing Test: tensorflow - linalg.torch.linalg.norm
3 participants