67
67
"tensorflow-serving-eia" : "tensorflow-inference-eia" ,
68
68
"mxnet" : "mxnet-training" ,
69
69
"mxnet-serving" : "mxnet-inference" ,
70
+ "pytorch" : "pytorch-training" ,
71
+ "pytorch-serving" : "pytorch-inference" ,
70
72
"mxnet-serving-eia" : "mxnet-inference-eia" ,
71
73
}
72
74
76
78
"tensorflow-serving-eia" : [1 , 14 , 0 ],
77
79
"mxnet" : [1 , 4 , 1 ],
78
80
"mxnet-serving" : [1 , 4 , 1 ],
81
+ "pytorch" : [1 , 2 , 0 ],
82
+ "pytorch-serving" : [1 , 2 , 0 ],
79
83
"mxnet-serving-eia" : [1 , 4 , 1 ],
80
84
}
81
85
@@ -119,10 +123,15 @@ def _using_merged_images(region, framework, py_version, framework_version):
119
123
is_gov_region = region in VALID_ACCOUNTS_BY_REGION
120
124
is_py3 = py_version == "py3" or py_version is None
121
125
is_merged_versions = _is_merged_versions (framework , framework_version )
126
+
122
127
return (
123
128
((not is_gov_region ) or region in ASIMOV_VALID_ACCOUNTS_BY_REGION )
124
129
and is_merged_versions
125
- and (is_py3 or _is_tf_14_or_later (framework , framework_version ))
130
+ and (
131
+ is_py3
132
+ or _is_tf_14_or_later (framework , framework_version )
133
+ or _is_pt_12_or_later (framework , framework_version )
134
+ )
126
135
)
127
136
128
137
@@ -140,6 +149,19 @@ def _is_tf_14_or_later(framework, framework_version):
140
149
)
141
150
142
151
152
+ def _is_pt_12_or_later (framework , framework_version ):
153
+ """
154
+ Args:
155
+ framework: Name of the frameowork
156
+ framework_version: framework version
157
+ """
158
+ # Asimov team now owns PyTorch 1.2.0 py2 and py3
159
+ asimov_lowest_pt = [1 , 2 , 0 ]
160
+ version = [int (s ) for s in framework_version .split ("." )]
161
+ is_pytorch = framework in ("pytorch" , "pytorch-serving" )
162
+ return is_pytorch and version >= asimov_lowest_pt [0 : len (version )]
163
+
164
+
143
165
def _registry_id (region , framework , py_version , account , framework_version ):
144
166
"""
145
167
Args:
0 commit comments