Skip to content

Firebase ML Changing service endpoint #421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions firebase_admin/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ def _validate_page_token(page_token):
class _MLService:
"""Firebase ML service."""

PROJECT_URL = 'https://mlkit.googleapis.com/v1beta1/projects/{0}/'
OPERATION_URL = 'https://mlkit.googleapis.com/v1beta1/'
PROJECT_URL = 'https://firebaseml.googleapis.com/v1beta2/projects/{0}/'
OPERATION_URL = 'https://firebaseml.googleapis.com/v1beta2/'
POLL_EXPONENTIAL_BACKOFF_FACTOR = 1.5
POLL_BASE_WAIT_TIME_SECONDS = 3

Expand Down
5 changes: 3 additions & 2 deletions tests/test_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
from tests import testutils


BASE_URL = 'https://mlkit.googleapis.com/v1beta1/'
BASE_URL = 'https://firebaseml.googleapis.com/v1beta2/'
PROJECT_ID = 'my-project-1'

PAGE_TOKEN = 'pageToken'
NEXT_PAGE_TOKEN = 'nextPageToken'

Expand Down Expand Up @@ -306,7 +307,7 @@ def instrument_ml_service(status=200, payload=None, operations=False, app=None):
app = firebase_admin.get_app()
ml_service = ml._get_ml_service(app)
recorder = []
session_url = 'https://mlkit.googleapis.com/v1beta1/'
session_url = 'https://firebaseml.googleapis.com/v1beta2/'

if isinstance(status, list):
adapter = testutils.MockMultiRequestAdapter
Expand Down