feat(ml): deprecate Machine Learning APIs - #981
Conversation
There was a problem hiding this comment.
Code Review
This pull request deprecates the Firebase ML module, adding deprecation warnings and updating docstrings across its functions and classes, along with corresponding unit tests. The review feedback recommends introducing a helper function to inspect the call stack and guard the deprecation warnings, which prevents duplicate warning flooding when public APIs internally invoke other deprecated methods or instantiate deprecated classes.
|
Hi @paulb777 could you also review the deprecation notice for this PR? Thank you! |
| ) | ||
|
|
||
|
|
||
| def _is_internal_call(): |
There was a problem hiding this comment.
Without this check, calling a single public API like get_model() or list_models() triggers multiple cascading warnings. I tried to have a stack inspection here so this helper function suppresses the internal constructor warnings and developers receive exactly one clean warning per public API call or direct class instantiation.
The PR deprecates the Firebase Machine Learning module, functions, and classes ahead of the service turndown on June 15, 2027. Developers are instructed to migrate their custom model hosting workflows directly to Cloud Storage for Firebase. Unit tests are added to verify that
DeprecationWarningis triggered with the expected message.