ML Engine BigQuery: Request had insufficient authentication scopes -


i'm running tensorflow model submitting training on ml engine. have built pipeline reads bigquery using tf.contrib.cloud.python.ops.bigquery_reader_ops.bigqueryreader reader queue.

everything works fine using datalab , in local, setting google_application_credentials variable pointing json file credentials key. however, when submit training job in cloud these errors (i post main two):

  1. permission denied: error executing http request (http response code 403, error code 0, error message '') when reading schema for...

  2. there error creating model. check details: request had insufficient authentication scopes.

i've checked else correctly defining table schema in script , project/dataset/table ids/names

i paste down here whole error present in log more clarity:

message: "traceback (most recent call last):

file "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main     "__main__", fname, loader, pkg_name)  file "/usr/lib/python2.7/runpy.py", line 72, in _run_code     exec code in run_globals  file "/root/.local/lib/python2.7/site-packages/trainer/task.py", line 131, in <module>     hparams=hparam.hparams(**args.__dict__)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 210, in run     return _execute_schedule(experiment, schedule)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 47, in _execute_schedule     return task()   file "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 495, in train_and_evaluate     self.train(delay_secs=0)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 275, in train     hooks=self._train_monitors + extra_hooks)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 665, in _call_train     monitors=hooks)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 289, in new_func     return func(*args, **kwargs)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 455, in fit     loss = self._train_model(input_fn=input_fn, hooks=hooks)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1007, in _train_model     _, loss = mon_sess.run([model_fn_ops.train_op, model_fn_ops.loss])  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/monitored_session.py", line 521, in __exit__     self._close_internal(exception_type)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/monitored_session.py", line 556, in _close_internal     self._sess.close()  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/monitored_session.py", line 791, in close     self._sess.close()  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/monitored_session.py", line 888, in close     ignore_live_threads=true)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/coordinator.py", line 389, in join     six.reraise(*self._exc_info_to_raise)  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/queue_runner_impl.py", line 238, in _run     enqueue_callable()  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1063, in _single_operation_run     target_list_as_strings, status, none)  file "/usr/lib/python2.7/contextlib.py", line 24, in __exit__     self.gen.next()  file "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status     pywrap_tensorflow.tf_getcode(status)) permissiondeniederror: error executing http request (http response code 403, error code 0, error message '')      when reading schema pasquinelli-bigdata:transactions.t_11_hotel_25_w_train@1505224768418      [[node: generatebigqueryreaderpartitions = generatebigqueryreaderpartitions[columns=["f_racc_gest", "label", "f_rca", "w24", "eta", "w22", "w23", "w20", "w21", "f_leasing", "w2", "w16", "wlabel", "sex", "f_piva", "f_mutuo", "id_client", "f_ass_vita", "f_ass_danni", "w19", "w18", "w17", "prov", "w15", "w14", "w13", "w12", "w11", "w10", "w7", "w6", "w5", "w4", "w3", "f_fin", "w1", "imptot", "f_multib", "w9", "w8"], dataset_id="transactions", num_partitions=1, project_id="pasquinelli-bigdata", table_id="t_11_hotel_25_w_train", test_end_point="", timestamp_millis=1505224768418, _device="/job:localhost/replica:0/task:0/cpu:0"]()]] 

any suggestion extremely helpful since i'm relatively new gc. thank all.

support reading bigquery data cloud ml engine still under development, doing unsupported. issue hitting machines ml engine runs not have right scopes talk bigquery. potential issue may encounter running locally poor performance reading bigquery. these 2 examples of work needs addressed.

in meantime, recommend exporting data gcs training. going more scalable don't have worry poor training performance data increases. can pattern let preprocess data once, write result gcs in csv format, , multiple training runs try out different algorithms or hyperparameters.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -