gcloud

Google cloud ML with Scikit-Learn raises: 'dict' object has no attribute 'lower'

走远了吗. 提交于 2019-12-01 23:34:16
I used the following tutorial to use my Scikit-learn sentiment-analysis model in Google Cloud: https://cloud.google.com/ml-engine/docs/scikit/quickstart My model defined as follows: import csv import os from collections import defaultdict import sys import re import numpy as np import random import math import sklearn.datasets from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import MultinomialNB from sklearn.pipeline import Pipeline from sklearn.linear_model import SGDClassifier from sklearn import

Google Cloud ML FAILED_PRECONDITION

醉酒当歌 提交于 2019-12-01 19:25:03
I am trying to use Google Cloud ML to host a Tensorflow model and get predictions. I have a pretrained model that I have uploaded to the cloud and I have created a model and version in my Cloud ML console. I followed the instructions from here to prepare my data for requesting online predictions. For both the Python method and the glcoud method I get the same error. For simplicity, I'll post the gcloud method: I run gcloud ml-engine predict --model spell_correction --json-instances test.json where test.json is my input data file (a JSON array named instances ). I get the following result:

gcloud docker push reliability

£可爱£侵袭症+ 提交于 2019-12-01 19:03:08
问题 I have been having a lot of problems pushing images with gcloud docker push over the past few weeks. I've read through the many stack overflow discussions and github issues and workarounds but I haven't come across a solution to the inconsistency yet. Typically I will attempt to push a container image or two. The first push will almost always fail with the following retry-until-timeout output: I can only get around it with gcloud auth login . At most 5 minutes later I will attempt to push a

How to get remote client's IP address in an express based Node JS app running on App-Engine

微笑、不失礼 提交于 2019-12-01 08:18:51
问题 While trying to get IP, all standard headers values contain incorrect value. req.ip: ::ffff:172.17.0.5 req.headers['x-forwarded-for']: 169.254.160.2 req.socket.remoteAddress: ::ffff:172.17.0.5 All of these result in wrong ip. 回答1: Solutions: Either use let ip = req.headers['x-appengine-user-ip'] or Use Express's trust proxy settings by using app.set('trust proxy', true); Explanation: https://cloud.google.com/appengine/docs/flexible/nodejs/runtime#https_and_forwarding_proxies App Engine

See the files that will be deploy to Google AppEngine

青春壹個敷衍的年華 提交于 2019-12-01 07:41:38
I'm looking for way to make sure the files I deploy to Google AppEngine (Python) using gcloud app deploy are only the files I need. In the log file it only list files that are skipped but not the files that are deployed. Is there a way to see this list? Dan Cornilescu All the files and directories present or sym-linked under an app service/module directory (i.e. the directory where the respective service/module's .yaml file exists) will be deployed when the respective app service/module is deployed, unless they're skipped files (i.e. they match the default or configured skip_files patterns -

Using gcloud console for Google App Engine causes a Runtime error from metrics

杀马特。学长 韩版系。学妹 提交于 2019-12-01 05:55:02
I'm trying to use the gcloud console through the browser. When I clone my repository and start the dev server, I get a runtime error from metrics: $ dev_appserver.py $PWD Traceback (most recent call last): File "/google/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 101, in <module> _run_file(__file__, globals()) File "/google/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 97, in _run_file execfile(_PATHS.script_file(script_name), globals_) File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py",

See the files that will be deploy to Google AppEngine

拜拜、爱过 提交于 2019-12-01 04:15:08
问题 I'm looking for way to make sure the files I deploy to Google AppEngine (Python) using gcloud app deploy are only the files I need. In the log file it only list files that are skipped but not the files that are deployed. Is there a way to see this list? 回答1: All the files and directories present or sym-linked under an app service/module directory (i.e. the directory where the respective service/module's .yaml file exists) will be deployed when the respective app service/module is deployed,

How to setup error reporting in Stackdriver from kubernetes pods?

那年仲夏 提交于 2019-12-01 03:30:13
I'm a bit confused at how to setup error reporting in kubernetes, so errors are visible in Google Cloud Console / Stackdriver "Error Reporting"? According to documentation https://cloud.google.com/error-reporting/docs/setting-up-on-compute-engine we need to enable fluentd' "forward input plugin" and then send exception data from our apps. I think this approach would have worked if we had setup fluentd ourselves, but it's already pre-installed on every node in a pod that just runs gcr.io/google_containers/fluentd-gcp docker image. How do we enable forward input on those pods and make sure that

Is it possible to route traffic to a specific Pod?

纵然是瞬间 提交于 2019-12-01 01:37:03
问题 Say I am running my app in GKE, and this is a multi-tenant application. I create multiple Pods that hosts my application. Now I want: Customers 1-1000 to use Pod1 Customers 1001-2000 to use Pod2 etc. If I have a gcloud global IP that points to my cluster, is it possible to route a request based on the incoming ipaddress/domain to the correct Pod that contains the customers data? 回答1: You can guarantee session affinity with services, but not as you are describing. So, your customers 1-1000 won

My java App Engine Managed VMs build doesn't deploy after 4/14/2015 update

£可爱£侵袭症+ 提交于 2019-12-01 00:17:48
My java App Engine Managed VMs build doesn't deploy any more using gcloud preview app deploy target/myapp-SNAPSHOT I get this: ERROR: Found no valid App Engine configuration files in directory The usage of gcloud preview app deploy changed in our gcloud 2015.04.14 release, you now have to specify the .yaml file for your module as well as --project projectID . The documentation should be updated shortly. For Java, we've released an updated maven plugin. In your pom.xml, please add the following: <plugin> <groupId>com.google.appengine</groupId> <artifactId>gcloud-maven-plugin</artifactId>