mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
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:
@ -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,
|
||||
|
@ -1,4 +1,4 @@
|
||||
# iOS simulator requirements
|
||||
coremltools==5.0b5
|
||||
protobuf==3.20.2
|
||||
optree==0.12.1
|
||||
optree==0.11.0
|
||||
|
@ -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
|
||||
|
2
.github/workflows/_win-test.yml
vendored
2
.github/workflows/_win-test.yml
vendored
@ -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
|
||||
|
@ -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]]
|
||||
|
@ -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"
|
||||
|
2
setup.py
2
setup.py
@ -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"],
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user