@@ -106,6 +106,7 @@ def convert(
106106 quant_config : Optional [qcfg .QuantConfig ] = None ,
107107 dynamic_shapes : Optional [Union [dict [str , Any ], Tuple [Any , ...]]] = None ,
108108 _ai_edge_converter_flags : Optional [dict [str , Any ]] = None ,
109+ _saved_model_dir : Optional [str ] = None ,
109110 ) -> model .TfLiteModel :
110111 """Finalizes the conversion and produces an edge model.
111112
@@ -139,6 +140,8 @@ def convert(
139140 of this function and so needs to be treated as such. Please do not rely
140141 on this parameter except for local debugging as this can be removed in a
141142 future release.
143+ _saved_model_dir: Directory for the intermediate saved model. If not
144+ specified, a random temporary directory would be used.
142145
143146 Returns:
144147 The converted edge model.
@@ -171,6 +174,7 @@ def convert(
171174 strict_export = strict_export ,
172175 quant_config = quant_config ,
173176 _tfl_converter_flags = _ai_edge_converter_flags ,
177+ _saved_model_dir = _saved_model_dir ,
174178 )
175179
176180
@@ -216,6 +220,7 @@ def convert(
216220 quant_config : Optional [qcfg .QuantConfig ] = None ,
217221 dynamic_shapes : Optional [Union [dict [str , Any ], Tuple [Any , ...]]] = None ,
218222 _ai_edge_converter_flags : Optional [dict [str , Any ]] = None ,
223+ _saved_model_dir : Optional [str ] = None ,
219224) -> model .TfLiteModel :
220225 """Converts a PyTorch model to an edge model with a default signature.
221226
@@ -240,6 +245,8 @@ def convert(
240245 this function and so needs to be treated as such. Please do not rely on
241246 this parameter except for local debugging as this can be removed in a
242247 future release.
248+ _saved_model_dir: Directory for the intermediate saved model. If not
249+ specified, a random temporary directory would be used.
243250
244251 Returns:
245252 The converted edge model.
@@ -259,4 +266,5 @@ def convert(
259266 quant_config = quant_config ,
260267 dynamic_shapes = dynamic_shapes ,
261268 _ai_edge_converter_flags = _ai_edge_converter_flags ,
269+ _saved_model_dir = _saved_model_dir ,
262270 )
0 commit comments