Revert "[BE] bump optree version to 0.12.1 (#130139)"

This reverts commit 8fcb156e8b5697a8f292db6db2a1803c5f4ce2d7.

Reverted https://github.com/pytorch/pytorch/pull/130139 on behalf of https://github.com/clee2000 due to broke inductor/test_torchinductor_codegen_dynamic_shapes.py and test_sympy_utils.py 8fcb156e8b ([comment](https://github.com/pytorch/pytorch/pull/130139#issuecomment-2229248447))
This commit is contained in:
PyTorch MergeBot
2024-07-15 19:42:11 +00:00
parent f1456c74a0
commit 074a5c0c9b
13 changed files with 16 additions and 15 deletions

View File

@ -134,9 +134,9 @@ opt-einsum==3.3
#Pinned versions: 3.3
#test that import: test_linalg.py
optree==0.12.1
optree==0.11.0
#Description: A library for tree manipulation
#Pinned versions: 0.12.1
#Pinned versions: 0.11.0
#test that import: test_vmap.py, test_aotdispatch.py, test_dynamic_shapes.py,
#test_pytree.py, test_ops.py, test_control_flow.py, test_modules.py,
#common_utils.py, test_eager_transforms.py, test_python_dispatch.py,

View File

@ -1,4 +1,4 @@
# iOS simulator requirements
coremltools==5.0b5
protobuf==3.20.2
optree==0.12.1
optree==0.11.0

View File

@ -26,7 +26,7 @@ pytest-cpp==2.3.0
rockset==1.0.3
z3-solver==4.12.2.0
tensorboard==2.13.0
optree==0.12.1
optree==0.11.0
# NB: test_hparams_* from test_tensorboard is failing with protobuf 5.26.0 in
# which the stringify metadata is wrong when escaping double quote
protobuf==3.20.2

View File

@ -188,7 +188,7 @@ jobs:
run: |
pushd "${PYTORCH_FINAL_PACKAGE_DIR}"
# shellcheck disable=SC2046,SC2102
python3 -mpip install $(echo *.whl)[opt-einsum,optree] optree==0.12.1
python3 -mpip install $(echo *.whl)[opt-einsum,optree]
popd
.ci/pytorch/win-test.sh

View File

@ -151,7 +151,7 @@ init_command = [
'junitparser==2.1.1',
'rich==10.9.0',
'pyyaml==6.0.1',
'optree==0.12.1',
'optree==0.11.0',
]
[[linter]]

View File

@ -19,4 +19,4 @@ ninja
# setuptools was removed from default python install
setuptools ; python_version >= "3.12"
packaging
optree>=0.12.0
optree>=0.11.0 ; python_version <= "3.12"

View File

@ -1199,7 +1199,7 @@ def main():
install_requires += extra_install_requires
extras_require = {
"optree": ["optree>=0.12.0"],
"optree": ["optree==0.11.0"],
"opt-einsum": ["opt-einsum>=3.3"],
}

View File

@ -3404,7 +3404,7 @@ class TestComposability(TestCase):
@onlyCPU
def test_no_warning_on_import_functorch(self, device):
out = subprocess.check_output(
[sys.executable, "-W", "always", "-c", "import functorch"],
[sys.executable, "-W", "all", "-c", "import functorch"],
stderr=subprocess.STDOUT,
cwd=os.path.dirname(os.path.realpath(__file__)),
).decode("utf-8")

View File

@ -1479,7 +1479,7 @@ assert KinetoStepTracker.current_step() == initial_step + 2 * niters
"""
try:
subprocess.check_output(
[sys.executable, "-W", "always", "-c", script],
[sys.executable, "-W", "all", "-c", script],
cwd=os.path.dirname(os.path.realpath(__file__)),
)
except subprocess.CalledProcessError as e:

View File

@ -11587,7 +11587,7 @@ class TestFallbackWarning(TestCase):
# TODO: Remove once test_testing.py is running on MPS devices
def test_no_warning_on_import(self):
out = subprocess.check_output(
[sys.executable, "-W", "always", "-c", "import torch"],
[sys.executable, "-W", "all", "-c", "import torch"],
stderr=subprocess.STDOUT,
# On Windows, opening the subprocess with the default CWD makes `import torch`
# fail, so just set CWD to this script's directory
@ -11629,10 +11629,11 @@ with warnings.catch_warnings(record=True) as w:
if len(w) != 1:
print(w)
exit(2)
"""
try:
subprocess.check_output(
[sys.executable, '-W', 'always', '-c', script],
[sys.executable, '-W', 'all', '-c', script],
stderr=subprocess.STDOUT,
# On Windows, opening the subprocess with the default CWD makes `import torch`
# fail, so just set CWD to this script's directory

View File

@ -887,7 +887,7 @@ exit(len(w))
"""
try:
subprocess.check_output(
[sys.executable, '-W', 'always', '-c', script],
[sys.executable, '-W', 'all', '-c', script],
stderr=subprocess.STDOUT,
# On Windows, opening the subprocess with the default CWD makes `import torch`
# fail, so just set CWD to this script's directory

View File

@ -2216,7 +2216,7 @@ class TestImports(TestCase):
@classmethod
def _check_python_output(cls, program) -> str:
return subprocess.check_output(
[sys.executable, "-W", "always", "-c", program],
[sys.executable, "-W", "all", "-c", program],
stderr=subprocess.STDOUT,
# On Windows, opening the subprocess with the default CWD makes `import torch`
# fail, so just set CWD to this script's directory

View File

@ -273,7 +273,7 @@ def tree_flatten(
>>> from collections import OrderedDict
>>> tree = OrderedDict([('b', (2, [3, 4])), ('a', 1), ('c', None), ('d', 5)])
>>> tree_flatten(tree)
([2, 3, 4, 1, None, 5], PyTreeSpec(OrderedDict({'b': (*, [*, *]), 'a': *, 'c': *, 'd': *}), NoneIsLeaf))
([2, 3, 4, 1, None, 5], PyTreeSpec(OrderedDict([('b', (*, [*, *])), ('a', *), ('c', *), ('d', *)]), NoneIsLeaf))
Args:
tree (pytree): A pytree to flatten.