Skip to content

Commit d2bd9ac

Browse files
XuehaiPanpytorchmergebot
authored andcommitted
[BE] bump optree version to 0.12.1 (#130139)
0.12.0 Major Updates: - Add context manager to temporarily set the dictionary sorting mode - Add accessor APIs - Use `stable` tag for `pybind11` for Python 3.13 support - Fix potential segmentation fault for pickling support 0.12.1 Updates: - Fix warning regression during import when launch with strict warning filters Closes #130155 Pull Request resolved: #130139 Approved by: https://github.com/zou3519 ghstack dependencies: #130895
1 parent 50436d5 commit d2bd9ac

13 files changed

Lines changed: 15 additions & 16 deletions

File tree

.ci/docker/requirements-ci.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ opt-einsum==3.3
134134
#Pinned versions: 3.3
135135
#test that import: test_linalg.py
136136

137-
optree==0.11.0
137+
optree==0.12.1
138138
#Description: A library for tree manipulation
139-
#Pinned versions: 0.11.0
139+
#Pinned versions: 0.12.1
140140
#test that import: test_vmap.py, test_aotdispatch.py, test_dynamic_shapes.py,
141141
#test_pytree.py, test_ops.py, test_control_flow.py, test_modules.py,
142142
#common_utils.py, test_eager_transforms.py, test_python_dispatch.py,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# iOS simulator requirements
22
coremltools==5.0b5
33
protobuf==3.20.2
4-
optree==0.11.0
4+
optree==0.12.1

.github/requirements/pip-requirements-macOS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pytest-cpp==2.3.0
2626
rockset==1.0.3
2727
z3-solver==4.12.2.0
2828
tensorboard==2.13.0
29-
optree==0.11.0
29+
optree==0.12.1
3030
# NB: test_hparams_* from test_tensorboard is failing with protobuf 5.26.0 in
3131
# which the stringify metadata is wrong when escaping double quote
3232
protobuf==3.20.2

.github/workflows/_win-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ jobs:
188188
run: |
189189
pushd "${PYTORCH_FINAL_PACKAGE_DIR}"
190190
# shellcheck disable=SC2046,SC2102
191-
python3 -mpip install $(echo *.whl)[opt-einsum,optree]
191+
python3 -mpip install $(echo *.whl)[opt-einsum,optree] optree==0.12.1
192192
popd
193193
194194
.ci/pytorch/win-test.sh

.lintrunner.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ init_command = [
152152
'junitparser==2.1.1',
153153
'rich==10.9.0',
154154
'pyyaml==6.0.1',
155-
'optree==0.11.0',
155+
'optree==0.12.1',
156156
]
157157

158158
[[linter]]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ ninja
2020
# setuptools was removed from default python install
2121
setuptools ; python_version >= "3.12"
2222
packaging
23-
optree>=0.11.0 ; python_version <= "3.12"
23+
optree>=0.12.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ def main():
12011201
install_requires += extra_install_requires
12021202

12031203
extras_require = {
1204-
"optree": ["optree==0.11.0"],
1204+
"optree": ["optree>=0.12.0"],
12051205
"opt-einsum": ["opt-einsum>=3.3"],
12061206
}
12071207

test/functorch/test_eager_transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3404,7 +3404,7 @@ def f(x):
34043404
@onlyCPU
34053405
def test_no_warning_on_import_functorch(self, device):
34063406
out = subprocess.check_output(
3407-
[sys.executable, "-W", "all", "-c", "import functorch"],
3407+
[sys.executable, "-W", "always", "-c", "import functorch"],
34083408
stderr=subprocess.STDOUT,
34093409
cwd=os.path.dirname(os.path.realpath(__file__)),
34103410
).decode("utf-8")

test/profiler/test_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ def run_batch():
14791479
"""
14801480
try:
14811481
subprocess.check_output(
1482-
[sys.executable, "-W", "all", "-c", script],
1482+
[sys.executable, "-W", "always", "-c", script],
14831483
cwd=os.path.dirname(os.path.realpath(__file__)),
14841484
)
14851485
except subprocess.CalledProcessError as e:

test/test_mps.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11598,7 +11598,7 @@ class TestFallbackWarning(TestCase):
1159811598
# TODO: Remove once test_testing.py is running on MPS devices
1159911599
def test_no_warning_on_import(self):
1160011600
out = subprocess.check_output(
11601-
[sys.executable, "-W", "all", "-c", "import torch"],
11601+
[sys.executable, "-W", "always", "-c", "import torch"],
1160211602
stderr=subprocess.STDOUT,
1160311603
# On Windows, opening the subprocess with the default CWD makes `import torch`
1160411604
# fail, so just set CWD to this script's directory
@@ -11640,11 +11640,10 @@ def test_warn_on_not_implemented_with_fallback(self):
1164011640
if len(w) != 1:
1164111641
print(w)
1164211642
exit(2)
11643-
1164411643
"""
1164511644
try:
1164611645
subprocess.check_output(
11647-
[sys.executable, '-W', 'all', '-c', script],
11646+
[sys.executable, '-W', 'always', '-c', script],
1164811647
stderr=subprocess.STDOUT,
1164911648
# On Windows, opening the subprocess with the default CWD makes `import torch`
1165011649
# fail, so just set CWD to this script's directory

0 commit comments

Comments
 (0)