File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 16
16
# For user, we install the onnx release known to work with our release.
17
17
with open (os .path .join (TOP_DIR , 'ONNX_VERSION_NUMBER' )) as onnx_version_file :
18
18
onnx_version = onnx_version_file .read ().strip ()
19
- onnx_dep = "onnx>=" + onnx_version
20
- # For ONNX 1.9.0 for the Bonsai fork we need to use ONNX 1.9.0
21
- # since we don't have an internal ONNX fork and the onnx_version above
22
- # will be the one generated by the build process (1.9.0.xxxx), which
23
- # does not exist in the ONNX repo
24
- if onnx_version .startswith ("1.9.0" ):
25
- onnx_dep = "onnx==1.9.0"
19
+ # see if our build process has added a suffix to the version
20
+ n_dots = [i for i , letter in enumerate (s ) if letter == "." ]
26
21
22
+ # get the ONNX version from the upstream repo
23
+ # by removing the suffix appended by the Fork build process
24
+ if len (n_dots ) == 3 :
25
+ onnx_version = onnx_version [0 :n_dots [- 1 ]]
26
+
27
+ onnx_dep = "onnx==" + onnx_version
27
28
try :
28
29
git_version = subprocess .check_output (['git' , 'rev-parse' , 'HEAD' ],
29
30
cwd = TOP_DIR ).decode ('ascii' ).strip ()
You can’t perform that action at this time.
0 commit comments