File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 2424import time
2525import os
2626from urllib import parse
27+ import warnings
2728
2829import requests
2930
@@ -383,11 +384,14 @@ def __ne__(self, other):
383384
384385 @staticmethod
385386 def _init_model_source (data ):
387+ """Initialize the ML model source."""
386388 gcs_tflite_uri = data .pop ('gcsTfliteUri' , None )
387389 if gcs_tflite_uri :
388390 return TFLiteGCSModelSource (gcs_tflite_uri = gcs_tflite_uri )
389391 auto_ml_model = data .pop ('automlModel' , None )
390392 if auto_ml_model :
393+ warnings .warn ('AutoML model support is deprecated and will be removed in the next '
394+ 'major version.' , DeprecationWarning )
391395 return TFLiteAutoMlSource (auto_ml_model = auto_ml_model )
392396 return None
393397
@@ -604,9 +608,14 @@ def as_dict(self, for_upload=False):
604608
605609
606610class TFLiteAutoMlSource (TFLiteModelSource ):
607- """TFLite model source representing a tflite model created with AutoML."""
611+ """TFLite model source representing a tflite model created with AutoML.
612+
613+ AutoML model support is deprecated and will be removed in the next major version.
614+ """
608615
609616 def __init__ (self , auto_ml_model , app = None ):
617+ warnings .warn ('AutoML model support is deprecated and will be removed in the next '
618+ 'major version.' , DeprecationWarning )
610619 self ._app = app
611620 self .auto_ml_model = auto_ml_model
612621
You can’t perform that action at this time.
0 commit comments