3

So I'm trying to run a training job on google cloud's AI-platform for an image classifier written in tensorflow by the command line:

gcloud ai-platform jobs submit training my_job \
          --module-name trainer.final_task \
          --staging-bucket gs://project_bucket \
          --package-path trainer/ \

but I keep getting the ERROR: (gcloud.ai-platform.jobs.submit.training) User [myemail@gmail.com] does not have permission to access project [my_project] (or it may not exist): Permission denied on 'locations/value' (or it may not exist).

I don't get how this is possible as I own the project on gcloud (with that e-mail address) and am even expressly linked to it on the IAM policy bindings. Has anyone experienced this before?

EXTRA INFO:

  • I am using gcloud as an individual, there are no organisations involved. Hence the only members linked in IAM policy bindings are me and gcloud service accounts.

  • The code works perfectly when trained locally (using gcloud ai-platform local train) with the same parameters.

3 Answers3

2

I encountered the same problem, having an owner account have permissions denied for training a job. I had accidentally added "central1" as the server when it had to be "us-central1". Hopefully this helps!

Archetype
  • 157
  • 3
  • 14
1

I need little more information to be sure, but such error appears when you have different project set in Gcloud SDK. Please verify if project in gcloud config list project is the same as the project you want to use. If not please submit gcloud config set project [YOUR PROJECT]. You can verify the changes with list command again.

vitooh
  • 3,049
  • 1
  • 3
  • 14
  • The project is set to the one i would like to use, `gcloud config list project` reflects this as well – stefftaelman Dec 19 '19 at 15:43
  • Do you know what is this path `locations/value`? Have you used your own code or used some repo? – vitooh Dec 20 '19 at 07:45
  • I use the main script `final_task` that calls a few other scripts, all of my own code. However, none of these are called `value` or are located in a folder `locations`. There does appear to be a folder called `locations` in the main google cloud sdk installation folder. No `value` file though, and this is a fresh installation. – stefftaelman Dec 20 '19 at 09:47
  • It will be hard without the code, however, the error says `Permission denied on 'locations/value' (or it may not exist)` so it seems that you are referring to not existing file or path. If I were in your shoes I would search for it in the code – vitooh Dec 20 '19 at 10:19
  • I don't refer to it anywhere in my code. The code itself also works when i train it locally, but returns the error as soon as I try to submit it as a job on gcloud. – stefftaelman Dec 20 '19 at 12:40
0

The issue with me was that my notebook location was in a different region and I was trying to deploy in a different region. After I changed the location to my notebook location, it worked.

Sourabh Jain
  • 450
  • 5
  • 16