Skip to content

Commit 073f5dc

Browse files
[release/2.1] pin sympy==1.12.1 and skip pytorch-nightly installation… (#1530)
This PR pins sympy==1.12.1 in the .ci/docker/requirements-ci.txt file Also it skips pytorch-nightly installation in docker images Installation of pytorch-nightly is needed to prefetch mobilenet_v2 avd v3 models for some tests. Came from 85bd6bc Models are downloaded on first use to the folder /root/.cache/torch/hub But pytorch-nightly installation also overrides .ci/docker/requirements-ci.txt settings and upgrades some of python packages (sympy from 1.12.0 to 1.13.0) which causes several 'dynamic_shapes' tests to fail Skip prefetching models affects these tests without any errors (but **internet access required**): - python test/mobile/model_test/gen_test_model.py mobilenet_v2 - python test/quantization/eager/test_numeric_suite_eager.py -k test_mobilenet_v3 Issue ROCm/frameworks-internal#8772 Also, in case of some issues these models can be prefetched after pytorch building and before testing (cherry picked from commit b92b34d)
1 parent 03d7b35 commit 073f5dc

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.ci/docker/common/cache_vision_models.sh

+14
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
set -ex
44

5+
# Skip pytorch-nightly installation in docker images
6+
# Installation of pytorch-nightly is needed to prefetch mobilenet_v2 avd v3 models for some tests.
7+
# Came from https://github.com/ROCm/pytorch/commit/85bd6bc0105162293fa0bbfb7b661f85ec67f85a
8+
# Models are downloaded on first use to the folder /root/.cache/torch/hub
9+
# But pytorch-nightly installation also overrides .ci/docker/requirements-ci.txt settings
10+
# and upgrades some of python packages (sympy from 1.12.0 to 1.13.0)
11+
# which causes several 'dynamic_shapes' tests to fail
12+
# Skip prefetching models affects these tests without any errors:
13+
# python test/mobile/model_test/gen_test_model.py mobilenet_v2
14+
# python test/quantization/eager/test_numeric_suite_eager.py -k test_mobilenet_v3
15+
# Issue https://github.com/ROCm/frameworks-internal/issues/8772
16+
echo "Skip torch-nightly installation"
17+
exit 0
18+
519
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
620

721
# Cache the test models at ~/.cache/torch/hub/

.ci/docker/requirements-ci.txt

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ click==8.1.7
1515
#Pinned versions: 8.1.7
1616
#test that import:
1717

18+
sympy==1.12.1
19+
#Description: Python library for symbolic mathematics
20+
# installed before coremltools to avoid installation of greater sympy version
21+
#Pinned versions: 1.12.1
22+
#test that import:
23+
1824
coremltools==5.0b5
1925
#Description: Apple framework for ML integration
2026
#Pinned versions: 5.0b5

0 commit comments

Comments
 (0)