The Cloud Function simply loads the specified model and returns the predictions. For example, when doing A/B testing, the web client tells the Cloud Function what model to use based on some environment variable (see Web Client section below for an example). model_path = request.json: This is a useful way to let the client specify what model version to use.This is needed to enable CORS securely, otherwise, client requests will fail. WEB_CLIENT_URL: This environment variable is the web client’s URL.Otherwise, this value can be set directly via the CLI when you deploy the function via the service-account option, as shown in the deployment example. If running the Cloud Function locally, then this is set with GOOGLE_APPLICATION_CREDENTIALS_FILE as explained above. GOOGLE_APPLICATION_CREDENTIALS: This environment variable is required to use the ML service.If running locally, set this to the path where the service account key file is (for example, using a. ![]() GOOGLE_APPLICATION_CREDENTIALS_FILE: Environment variable used for local debugging. ![]() Some important variables to keep in mind are:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |