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

cosine similarity: restrict to -/+1 explicitly #81863

Closed
wants to merge 1 commit into from

Conversation

nikitaved
Copy link
Collaborator

Fixes #78064.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 21, 2022

🔗 Helpful links

❌ 2 New Failures

As of commit 2e0818d (more details on the Dr. CI page):

Expand to see more
  • 2/2 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (functorch, 1, 1, linux.2xlarge) (1/2)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-07-21T11:22:25.4038315Z �[1m�[31mE ... the vmap fallback which is currently disabled�[0m
2022-07-21T11:22:25.4034164Z     tensor([[[-8.4784, -1.7658, -4.3228, -2.4005, -7.9506],
2022-07-21T11:22:25.4034647Z              [ 3.6116...        [-1.6054, -8.9746,  0.7456,  2.5540, -3.6433],
2022-07-21T11:22:25.4035098Z              [ 3.7379, -1.4590, -7.8209,  6.9096,  5.5491]]])
2022-07-21T11:22:25.4035384Z ))
2022-07-21T11:22:25.4035535Z 
2022-07-21T11:22:25.4035798Z     def _flat_vmap(func, batch_size, flat_in_dims, flat_args, args_spec, out_dims, randomness, **kwargs):
2022-07-21T11:22:25.4036336Z         vmap_level = _vmap_increment_nesting(batch_size, randomness)
2022-07-21T11:22:25.4036700Z         try:
2022-07-21T11:22:25.4037116Z             batched_inputs = _create_batched_inputs(flat_in_dims, flat_args, vmap_level, args_spec)
2022-07-21T11:22:25.4037590Z >           batched_outputs = func(*batched_inputs, **kwargs)
2022-07-21T11:22:25.4038315Z �[1m�[31mE           RuntimeError: aten::clamp_ hit the vmap fallback which is currently disabled�[0m
2022-07-21T11:22:25.4038626Z 
2022-07-21T11:22:25.4038888Z �[1m�[31mfunctorch/_src/vmap.py�[0m:487: RuntimeError
2022-07-21T11:22:25.4046252Z �[33m=============================== warnings summary ===============================�[0m
2022-07-21T11:22:25.4046862Z ../../../../opt/conda/lib/python3.7/site-packages/torch/nn/utils/_stateless.py:7
2022-07-21T11:22:25.4047952Z   /opt/conda/lib/python3.7/site-packages/torch/nn/utils/_stateless.py:7: DeprecationWarning: The `torch.nn.utils._stateless` code is deprecated now that it is publicly available. Please use `torch.nn.utils.stateless instead.
2022-07-21T11:22:25.4048790Z     "instead.", DeprecationWarning)
2022-07-21T11:22:25.4049010Z 
2022-07-21T11:22:25.4049175Z test/test_eager_transforms.py:49
2022-07-21T11:22:25.4050233Z   /var/lib/jenkins/functorch/test/test_eager_transforms.py:49: UserWarning: Couldn't import torchvision. Some of our tests use it, try to install it with commands from pytorch.org, post-fixed with `--no-deps` to avoid overwriting the pytorch installation
2022-07-21T11:22:25.4050962Z     UserWarning)

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (dynamo, 2, 2, linux.2xlarge) (2/2)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-07-21T11:25:19.2003143Z AssertionError: assert in []
2022-07-21T11:25:19.1998774Z   File "/opt/conda/lib/python3.7/site-packages/torch/_prims/__init__.py", line 442, in forward
2022-07-21T11:25:19.1999158Z     return _prim(*args, **kwargs)
2022-07-21T11:25:19.1999661Z   File "/opt/conda/lib/python3.7/site-packages/torch/_ops.py", line 49, in __call__
2022-07-21T11:25:19.2000066Z     return self._op(*args, **kwargs or {})
2022-07-21T11:25:19.2000620Z   File "/opt/conda/lib/python3.7/site-packages/torch/utils/_python_dispatch.py", line 74, in wrapped
2022-07-21T11:25:19.2001050Z     return f(self, *args, **kwargs)
2022-07-21T11:25:19.2001443Z   File "/var/lib/jenkins/workspace/test/test_ops.py", line 1473, in __torch_dispatch__
2022-07-21T11:25:19.2001879Z     def __torch_dispatch__(self, func, types, args=(), kwargs=None):
2022-07-21T11:25:19.2002338Z   File "/var/lib/jenkins/workspace/test/test_ops.py", line 1467, in check_inplace_view
2022-07-21T11:25:19.2002763Z     assert torch.Tag.inplace_view in func.tags
2022-07-21T11:25:19.2003143Z AssertionError: assert <Tag.inplace_view: 0> in []
2022-07-21T11:25:19.2003626Z  +  where <Tag.inplace_view: 0> = <class 'torch.Tag'>.inplace_view
2022-07-21T11:25:19.2004067Z  +    where <class 'torch.Tag'> = torch.Tag
2022-07-21T11:25:19.2004552Z  +  and   [] = <OpOverload(op='prims.copy_to', overload='default')>.tags
2022-07-21T11:25:19.2398753Z =============================== warnings summary ===============================
2022-07-21T11:25:19.2403714Z ../../../../../opt/conda/lib/python3.7/site-packages/_pytest/config/__init__.py:1129
2022-07-21T11:25:19.2404437Z   /opt/conda/lib/python3.7/site-packages/_pytest/config/__init__.py:1129: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: hypothesis
2022-07-21T11:25:19.2404807Z     self._mark_plugins_for_rewrite(hook)
2022-07-21T11:25:19.2404942Z 
2022-07-21T11:25:19.2406874Z ../../../../../opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_methods_invocations.py:18041
2022-07-21T11:25:19.2407517Z ../../../../../opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_methods_invocations.py:18041

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jul 22, 2022
@github-actions
Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Sep 20, 2022
@facebook-github-bot
Copy link
Contributor

/easycla

As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details.

This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign.

@linux-foundation-easycla
Copy link

CLA Not Signed

@github-actions github-actions bot closed this Nov 3, 2022
@github-actions github-actions bot deleted the nikitaved/restrict_cos_sim branch February 18, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed open source Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nn.CosineSimilarity returns value larger than 1
4 participants