Skip to content

Conversation

@XuehaiPan
Copy link
Collaborator

@XuehaiPan XuehaiPan commented Jul 16, 2024

Stack from ghstack (oldest at bottom):

sympy 1.13.0 introduces some breaking changes which break our tests. More specifically:

BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x2.0 != x2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. (#25614 by @smichr)

With sympy 1.12.1:

In [1]: from torch.utils._sympy.functions import FloorDiv

In [2]: FloorDiv(1.0, 1.0)
Out[2]: (1.0//1.0)
$ PYTORCH_TEST_WITH_DYNAMO=1 python test/test_sympy_utils.py
.........................................................................................s....................................................................
----------------------------------------------------------------------
Ran 158 tests in 15.362s

OK (skipped=1)

With sympy 1.13.0:

In [1]: from torch.utils._sympy.functions import FloorDiv

In [2]: FloorDiv(1.0, 1.0)
RecursionError: maximum recursion depth exceeded
$ PYTORCH_TEST_WITH_DYNAMO=1 python test/test_sympy_utils.py
.........................................................................................s....EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE....................................................F..........
======================================================================
...

======================================================================
ERROR: test_binary_ref_fn_floordiv_dtype_float (__main__.TestValueRanges.test_binary_ref_fn_floordiv_dtype_float) (a=9223372036854775807., b=9223372036854775807.)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/PanXuehai/Projects/pytorch/test/test_sympy_utils.py", line 229, in test_binary_ref
    r = getattr(ValueRangeAnalysis, fn)(a, b)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/PanXuehai/Projects/pytorch/torch/utils/_sympy/value_ranges.py", line 564, in floordiv
    r = FloorDiv(x, y)
...
RecursionError: maximum recursion depth exceeded

======================================================================
FAIL: test_unary_ref_fn_square_dtype_float (__main__.TestValueRanges.test_unary_ref_fn_square_dtype_float) (v=0)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/PanXuehai/Projects/pytorch/test/test_sympy_utils.py", line 210, in test_unary_ref
    self.assertEqual(ref_r, r.lower)
  File "/Users/PanXuehai/Projects/pytorch/torch/testing/_internal/common_utils.py", line 3721, in assertEqual
    raise error_metas.pop()[0].to_error(
AssertionError: Object comparison failed: 0.0 != 0

----------------------------------------------------------------------
Ran 158 tests in 35.650s

FAILED (failures=1, errors=289, skipped=1)

See also:

[ghstack-poisoned]
@XuehaiPan XuehaiPan requested a review from a team as a code owner July 16, 2024 13:45
@pytorch-bot
Copy link

pytorch-bot bot commented Jul 16, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/130836

Note: Links to docs will display an error until the docs builds have been completed.

❌ 4 New Failures, 1 Cancelled Job, 2 Unrelated Failures

As of commit bf5b562 with merge base 67c6941 (image):

NEW FAILURES - The following jobs have failed:

  • xpu / linux-jammy-xpu-py3.8 / test (default, 1, 4, linux.idc.xpu) (gh)
    Action 'https://api.github.com/repos/pytorch/pytorch/tarball/d7a8e8f7c5a0a536cecf397561d161d8576e9574' download has timed out. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
  • xpu / linux-jammy-xpu-py3.8 / test (default, 2, 4, linux.idc.xpu) (gh)
    Action 'https://api.github.com/repos/pytorch/pytorch/tarball/d7a8e8f7c5a0a536cecf397561d161d8576e9574' download has timed out. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
  • xpu / linux-jammy-xpu-py3.8 / test (default, 3, 4, linux.idc.xpu) (gh)
    Action 'https://api.github.com/repos/pytorch/pytorch/tarball/d7a8e8f7c5a0a536cecf397561d161d8576e9574' download has timed out. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
  • xpu / linux-jammy-xpu-py3.8 / test (default, 4, 4, linux.idc.xpu) (gh)
    Action 'https://api.github.com/repos/pytorch/pytorch/tarball/d7a8e8f7c5a0a536cecf397561d161d8576e9574' download has timed out. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

CANCELLED JOB - The following job was cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@Skylion007
Copy link
Collaborator

I'm pretty sure pinning this version will block Python 3.13 support

@XuehaiPan XuehaiPan requested review from ezyang, guangyey and lezcano July 16, 2024 13:49
@XuehaiPan XuehaiPan added oncall: releng In support of CI and Release Engineering dynamo-symbolic-analysis labels Jul 16, 2024
@XuehaiPan
Copy link
Collaborator Author

I'm pretty sure pinning this version will block Python 3.13 support

I think we can upgrade the version after all the tests are fixed.

@XuehaiPan
Copy link
Collaborator Author

I'm also wondering why our CI does not capture this.

@XuehaiPan XuehaiPan added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 16, 2024
@XuehaiPan XuehaiPan requested a review from albanD July 16, 2024 16:39
@albanD
Copy link
Collaborator

albanD commented Jul 16, 2024

Ho yeah I was planning on pin sympy >= 1.13 in #130689 haha

What are the tests that need fixing for this? because the PR above that upgrades sympy does pass all CI.

@XuehaiPan XuehaiPan added ciflow/mps Run MPS tests (subset of trunk) ciflow/inductor ciflow/rocm Trigger "default" config CI on ROCm ciflow/xpu Run XPU CI tasks labels Jul 16, 2024
@ezyang
Copy link
Contributor

ezyang commented Jul 17, 2024

Yeah, I'd rather just take a PR that gets us working on 1.13

@XuehaiPan XuehaiPan removed the ciflow/xpu Run XPU CI tasks label Jul 17, 2024
@XuehaiPan XuehaiPan mentioned this pull request Jul 17, 2024
@XuehaiPan
Copy link
Collaborator Author

What are the tests that need fixing for this? because the PR above that upgrades sympy does pass all CI.

See CI result for #130895.

Yeah, I'd rather just take a PR that gets us working on 1.13

I will try that.

@XuehaiPan
Copy link
Collaborator Author

Closing this in favor of #130895.

@XuehaiPan XuehaiPan closed this Jul 17, 2024
pytorchmergebot pushed a commit that referenced this pull request Jul 20, 2024
------

The opposite of #130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- #130836

See the PR description of #130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of #130689.

- #130689

Pull Request resolved: #130895
Approved by: https://github.com/ezyang
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jul 20, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jul 21, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
DiweiSun pushed a commit to DiweiSun/pytorch that referenced this pull request Jul 22, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
francograndegmailcom pushed a commit to francograndegmailcom/pytorch-pytorch that referenced this pull request Jul 23, 2024
ghstack-source-id: 864a00c
Pull Request resolved: pytorch/pytorch#130836
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Jul 25, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
@github-actions github-actions bot deleted the gh/XuehaiPan/125/head branch August 17, 2024 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/mps Run MPS tests (subset of trunk) ciflow/rocm Trigger "default" config CI on ROCm ciflow/trunk Trigger trunk jobs on your pull request dynamo-symbolic-analysis oncall: releng In support of CI and Release Engineering open source topic: not user facing topic category

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants