File tree Expand file tree Collapse file tree 4 files changed +73
-68
lines changed Expand file tree Collapse file tree 4 files changed +73
-68
lines changed Original file line number Diff line number Diff line change @@ -150,15 +150,15 @@ git submodule sync && git submodule update --init --recursive
150
150
printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
151
151
if [[ " $TORCH_VERSION " == " nightly" ]]; then
152
152
if [ " ${CU_VERSION:- } " == cpu ] ; then
153
- pip3 install --pre torch torchvision numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/nightly/cpu -U
153
+ pip3 install --pre torch torchvision numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/nightly/cpu -U
154
154
else
155
- pip3 install --pre torch torchvision numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
155
+ pip3 install --pre torch torchvision numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
156
156
fi
157
157
elif [[ " $TORCH_VERSION " == " stable" ]]; then
158
158
if [ " ${CU_VERSION:- } " == cpu ] ; then
159
- pip3 install torch torchvision numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/cpu
159
+ pip3 install torch torchvision numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/cpu
160
160
else
161
- pip3 install torch torchvision numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/$CU_VERSION
161
+ pip3 install torch torchvision numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/$CU_VERSION
162
162
fi
163
163
else
164
164
printf " Failed to install pytorch"
Original file line number Diff line number Diff line change @@ -31,15 +31,15 @@ git submodule sync && git submodule update --init --recursive
31
31
printf " Installing PyTorch with cu121"
32
32
if [[ " $TORCH_VERSION " == " nightly" ]]; then
33
33
if [ " ${CU_VERSION:- } " == cpu ] ; then
34
- pip3 install --pre torch numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/nightly/cpu -U
34
+ pip3 install --pre torch numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/nightly/cpu -U
35
35
else
36
- pip3 install --pre torch numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/nightly/cu121 -U
36
+ pip3 install --pre torch numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/nightly/cu121 -U
37
37
fi
38
38
elif [[ " $TORCH_VERSION " == " stable" ]]; then
39
39
if [ " ${CU_VERSION:- } " == cpu ] ; then
40
- pip3 install torch numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/cpu
40
+ pip3 install torch numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/cpu
41
41
else
42
- pip3 install torch numpy==1.26.4 numpy-base< 2.0 --index-url https://download.pytorch.org/whl/cu121
42
+ pip3 install torch numpy==1.26.4 numpy-base==1.26.4 --index-url https://download.pytorch.org/whl/cu121
43
43
fi
44
44
else
45
45
printf " Failed to install pytorch"
Original file line number Diff line number Diff line change 54
54
55
55
_THREAD_POOL_INIT = torch .get_num_threads ()
56
56
57
+
57
58
# monkey-patch dist transforms until https://github.com/pytorch/pytorch/pull/135001/ finds a home
58
59
@property
59
- def inv (self ):
60
- """
60
+ def _inv (self ):
61
+ """Patched version of Transform.inv.
62
+
61
63
Returns the inverse :class:`Transform` of this transform.
64
+
62
65
This should satisfy ``t.inv.inv is t``.
63
66
"""
64
67
inv = None
@@ -71,11 +74,11 @@ def inv(self):
71
74
return inv
72
75
73
76
74
- torch .distributions .transforms .Transform .inv = inv
77
+ torch .distributions .transforms .Transform .inv = _inv
75
78
76
79
77
80
@property
78
- def inv (self ):
81
+ def _inv (self ):
79
82
inv = None
80
83
if self ._inv is not None :
81
84
inv = self ._inv ()
@@ -91,4 +94,4 @@ def inv(self):
91
94
return inv
92
95
93
96
94
- ComposeTransform .inv = inv
97
+ ComposeTransform .inv = _inv
You can’t perform that action at this time.
0 commit comments