Skip to content

feat(ml): deprecate Machine Learning APIs - #981

Merged
yvonnep165 merged 4 commits into
mainfrom
yp-ml-deprecation
Sep 1, 2026
Merged

feat(ml): deprecate Machine Learning APIs#981
yvonnep165 merged 4 commits into
mainfrom
yp-ml-deprecation

Conversation

@yvonnep165

Copy link
Copy Markdown
Contributor

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 DeprecationWarning is triggered with the expected message.

@yvonnep165 yvonnep165 added release-note release:stage Stage a release candidate labels Aug 28, 2026
@yvonnep165 yvonnep165 self-assigned this Aug 28, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread firebase_admin/ml.py
Comment thread firebase_admin/ml.py
Comment thread firebase_admin/ml.py Outdated
Comment thread firebase_admin/ml.py Outdated
Comment thread firebase_admin/ml.py Outdated
Comment thread firebase_admin/ml.py Outdated
Comment thread firebase_admin/ml.py Outdated
Comment thread firebase_admin/ml.py Outdated
Comment thread firebase_admin/ml.py Outdated
Comment thread firebase_admin/ml.py Outdated
@yvonnep165

Copy link
Copy Markdown
Contributor Author

Hi @paulb777 could you also review the deprecation notice for this PR? Thank you!

@lahirumaramba lahirumaramba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

Comment thread firebase_admin/ml.py
)


def _is_internal_call():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@yvonnep165
yvonnep165 merged commit a7aafa2 into main Sep 1, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:stage Stage a release candidate release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants