File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 24
24
import time
25
25
import os
26
26
from urllib import parse
27
+ import warnings
27
28
28
29
import requests
29
30
@@ -383,11 +384,14 @@ def __ne__(self, other):
383
384
384
385
@staticmethod
385
386
def _init_model_source (data ):
387
+ """Initialize the ML model source."""
386
388
gcs_tflite_uri = data .pop ('gcsTfliteUri' , None )
387
389
if gcs_tflite_uri :
388
390
return TFLiteGCSModelSource (gcs_tflite_uri = gcs_tflite_uri )
389
391
auto_ml_model = data .pop ('automlModel' , None )
390
392
if auto_ml_model :
393
+ warnings .warn ('AutoML model support is deprecated and will be removed in the next '
394
+ 'major version.' , DeprecationWarning )
391
395
return TFLiteAutoMlSource (auto_ml_model = auto_ml_model )
392
396
return None
393
397
@@ -604,9 +608,14 @@ def as_dict(self, for_upload=False):
604
608
605
609
606
610
class 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
+ """
608
615
609
616
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 )
610
619
self ._app = app
611
620
self .auto_ml_model = auto_ml_model
612
621
You can’t perform that action at this time.
0 commit comments