6767 "tensorflow-serving-eia" : "tensorflow-inference-eia" ,
6868 "mxnet" : "mxnet-training" ,
6969 "mxnet-serving" : "mxnet-inference" ,
70+ "pytorch" : "pytorch-training" ,
71+ "pytorch-serving" : "pytorch-inference" ,
7072 "mxnet-serving-eia" : "mxnet-inference-eia" ,
7173}
7274
7678 "tensorflow-serving-eia" : [1 , 14 , 0 ],
7779 "mxnet" : [1 , 4 , 1 ],
7880 "mxnet-serving" : [1 , 4 , 1 ],
81+ "pytorch" : [1 , 2 , 0 ],
82+ "pytorch-serving" : [1 , 2 , 0 ],
7983 "mxnet-serving-eia" : [1 , 4 , 1 ],
8084}
8185
@@ -119,10 +123,15 @@ def _using_merged_images(region, framework, py_version, framework_version):
119123 is_gov_region = region in VALID_ACCOUNTS_BY_REGION
120124 is_py3 = py_version == "py3" or py_version is None
121125 is_merged_versions = _is_merged_versions (framework , framework_version )
126+
122127 return (
123128 ((not is_gov_region ) or region in ASIMOV_VALID_ACCOUNTS_BY_REGION )
124129 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+ )
126135 )
127136
128137
@@ -140,6 +149,19 @@ def _is_tf_14_or_later(framework, framework_version):
140149 )
141150
142151
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+
143165def _registry_id (region , framework , py_version , account , framework_version ):
144166 """
145167 Args:
0 commit comments