No module named trainer, Cloud ML Engine for TensorFlow Tutorial, Running Locally
up vote
4
down vote
favorite
Tutorial I am following
Have been attempting to follow the Google tutorial to use ML Engine for TensorFlow. Have gotten stuck where it says "run a local training job" with the error
/usr/bin/python: No module named trainer
Full command is:
gcloud ml-engine local train
--module-name trainer.task
--package-path trainer/
--job-dir $MODEL_DIR
--
--train-files $TRAIN_DATA
--eval-files $EVAL_DATA
--train-steps 1000
--eval-steps 100
The three variables are all set up correctly to my knowledge though it doesn't even get to them right now. The tutorial doesn't specify downloading a trainer file or how it is referenced, googling for the past hour hasn't turned up any working solutions. Have found this general explanation:
--module-name specifies the name of your application's main module,
using your package's namespace dot notation. This is the Python file
that you run to start your application. For example, if your main
module is .../my_application/trainer/task.py (see the recommended
project structure), then the module name is trainer.task
Any info would be appreciated.
python tensorflow google-cloud-platform google-cloud-ml
add a comment |
up vote
4
down vote
favorite
Tutorial I am following
Have been attempting to follow the Google tutorial to use ML Engine for TensorFlow. Have gotten stuck where it says "run a local training job" with the error
/usr/bin/python: No module named trainer
Full command is:
gcloud ml-engine local train
--module-name trainer.task
--package-path trainer/
--job-dir $MODEL_DIR
--
--train-files $TRAIN_DATA
--eval-files $EVAL_DATA
--train-steps 1000
--eval-steps 100
The three variables are all set up correctly to my knowledge though it doesn't even get to them right now. The tutorial doesn't specify downloading a trainer file or how it is referenced, googling for the past hour hasn't turned up any working solutions. Have found this general explanation:
--module-name specifies the name of your application's main module,
using your package's namespace dot notation. This is the Python file
that you run to start your application. For example, if your main
module is .../my_application/trainer/task.py (see the recommended
project structure), then the module name is trainer.task
Any info would be appreciated.
python tensorflow google-cloud-platform google-cloud-ml
1
Are you running this command from thecloudml-samples-master/census/estimator
directory?
– Dustin
Nov 19 at 16:44
I am running it on my computer from directory that includes the data and output folders. The tutorial seemed to specify downloading and running from the estimator directory in the cloud shell only, but perhaps I am misunderstanding.
– Grant Hosticka
Nov 19 at 16:57
1
You might have missed the "Download the code for this tutorial" step. You should have atrainer
directory that is local to where you are executing thegcloud
command.
– Dustin
Nov 19 at 17:05
That is the step I thought was only supposed to happen in the cloud shell but will try it locally as well, thanks.
– Grant Hosticka
Nov 19 at 17:11
1
It's not entirely clear, but the tutorial is assuming you're either doing this locally on your machine, or in Cloud Shell, not a mix of the two.
– Dustin
Nov 19 at 17:15
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
Tutorial I am following
Have been attempting to follow the Google tutorial to use ML Engine for TensorFlow. Have gotten stuck where it says "run a local training job" with the error
/usr/bin/python: No module named trainer
Full command is:
gcloud ml-engine local train
--module-name trainer.task
--package-path trainer/
--job-dir $MODEL_DIR
--
--train-files $TRAIN_DATA
--eval-files $EVAL_DATA
--train-steps 1000
--eval-steps 100
The three variables are all set up correctly to my knowledge though it doesn't even get to them right now. The tutorial doesn't specify downloading a trainer file or how it is referenced, googling for the past hour hasn't turned up any working solutions. Have found this general explanation:
--module-name specifies the name of your application's main module,
using your package's namespace dot notation. This is the Python file
that you run to start your application. For example, if your main
module is .../my_application/trainer/task.py (see the recommended
project structure), then the module name is trainer.task
Any info would be appreciated.
python tensorflow google-cloud-platform google-cloud-ml
Tutorial I am following
Have been attempting to follow the Google tutorial to use ML Engine for TensorFlow. Have gotten stuck where it says "run a local training job" with the error
/usr/bin/python: No module named trainer
Full command is:
gcloud ml-engine local train
--module-name trainer.task
--package-path trainer/
--job-dir $MODEL_DIR
--
--train-files $TRAIN_DATA
--eval-files $EVAL_DATA
--train-steps 1000
--eval-steps 100
The three variables are all set up correctly to my knowledge though it doesn't even get to them right now. The tutorial doesn't specify downloading a trainer file or how it is referenced, googling for the past hour hasn't turned up any working solutions. Have found this general explanation:
--module-name specifies the name of your application's main module,
using your package's namespace dot notation. This is the Python file
that you run to start your application. For example, if your main
module is .../my_application/trainer/task.py (see the recommended
project structure), then the module name is trainer.task
Any info would be appreciated.
python tensorflow google-cloud-platform google-cloud-ml
python tensorflow google-cloud-platform google-cloud-ml
edited 2 days ago
Maxim
3556
3556
asked Nov 19 at 15:50
Grant Hosticka
165318
165318
1
Are you running this command from thecloudml-samples-master/census/estimator
directory?
– Dustin
Nov 19 at 16:44
I am running it on my computer from directory that includes the data and output folders. The tutorial seemed to specify downloading and running from the estimator directory in the cloud shell only, but perhaps I am misunderstanding.
– Grant Hosticka
Nov 19 at 16:57
1
You might have missed the "Download the code for this tutorial" step. You should have atrainer
directory that is local to where you are executing thegcloud
command.
– Dustin
Nov 19 at 17:05
That is the step I thought was only supposed to happen in the cloud shell but will try it locally as well, thanks.
– Grant Hosticka
Nov 19 at 17:11
1
It's not entirely clear, but the tutorial is assuming you're either doing this locally on your machine, or in Cloud Shell, not a mix of the two.
– Dustin
Nov 19 at 17:15
add a comment |
1
Are you running this command from thecloudml-samples-master/census/estimator
directory?
– Dustin
Nov 19 at 16:44
I am running it on my computer from directory that includes the data and output folders. The tutorial seemed to specify downloading and running from the estimator directory in the cloud shell only, but perhaps I am misunderstanding.
– Grant Hosticka
Nov 19 at 16:57
1
You might have missed the "Download the code for this tutorial" step. You should have atrainer
directory that is local to where you are executing thegcloud
command.
– Dustin
Nov 19 at 17:05
That is the step I thought was only supposed to happen in the cloud shell but will try it locally as well, thanks.
– Grant Hosticka
Nov 19 at 17:11
1
It's not entirely clear, but the tutorial is assuming you're either doing this locally on your machine, or in Cloud Shell, not a mix of the two.
– Dustin
Nov 19 at 17:15
1
1
Are you running this command from the
cloudml-samples-master/census/estimator
directory?– Dustin
Nov 19 at 16:44
Are you running this command from the
cloudml-samples-master/census/estimator
directory?– Dustin
Nov 19 at 16:44
I am running it on my computer from directory that includes the data and output folders. The tutorial seemed to specify downloading and running from the estimator directory in the cloud shell only, but perhaps I am misunderstanding.
– Grant Hosticka
Nov 19 at 16:57
I am running it on my computer from directory that includes the data and output folders. The tutorial seemed to specify downloading and running from the estimator directory in the cloud shell only, but perhaps I am misunderstanding.
– Grant Hosticka
Nov 19 at 16:57
1
1
You might have missed the "Download the code for this tutorial" step. You should have a
trainer
directory that is local to where you are executing the gcloud
command.– Dustin
Nov 19 at 17:05
You might have missed the "Download the code for this tutorial" step. You should have a
trainer
directory that is local to where you are executing the gcloud
command.– Dustin
Nov 19 at 17:05
That is the step I thought was only supposed to happen in the cloud shell but will try it locally as well, thanks.
– Grant Hosticka
Nov 19 at 17:11
That is the step I thought was only supposed to happen in the cloud shell but will try it locally as well, thanks.
– Grant Hosticka
Nov 19 at 17:11
1
1
It's not entirely clear, but the tutorial is assuming you're either doing this locally on your machine, or in Cloud Shell, not a mix of the two.
– Dustin
Nov 19 at 17:15
It's not entirely clear, but the tutorial is assuming you're either doing this locally on your machine, or in Cloud Shell, not a mix of the two.
– Dustin
Nov 19 at 17:15
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Thanks to the information from Dustin in the comments have found the solution.
Was simply downloading the trainer directory on the Cloud Shell and not my local environment.
Now File Structure Looks Like:
estimator
|-- data
| |-- adult_data.csv
| |-- adult_test.csv
|-- output
|-- trainer
| |-- __init__.py
| |-- model.py
| |-- task.ipynb
| |-- task.py
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Thanks to the information from Dustin in the comments have found the solution.
Was simply downloading the trainer directory on the Cloud Shell and not my local environment.
Now File Structure Looks Like:
estimator
|-- data
| |-- adult_data.csv
| |-- adult_test.csv
|-- output
|-- trainer
| |-- __init__.py
| |-- model.py
| |-- task.ipynb
| |-- task.py
add a comment |
up vote
0
down vote
accepted
Thanks to the information from Dustin in the comments have found the solution.
Was simply downloading the trainer directory on the Cloud Shell and not my local environment.
Now File Structure Looks Like:
estimator
|-- data
| |-- adult_data.csv
| |-- adult_test.csv
|-- output
|-- trainer
| |-- __init__.py
| |-- model.py
| |-- task.ipynb
| |-- task.py
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Thanks to the information from Dustin in the comments have found the solution.
Was simply downloading the trainer directory on the Cloud Shell and not my local environment.
Now File Structure Looks Like:
estimator
|-- data
| |-- adult_data.csv
| |-- adult_test.csv
|-- output
|-- trainer
| |-- __init__.py
| |-- model.py
| |-- task.ipynb
| |-- task.py
Thanks to the information from Dustin in the comments have found the solution.
Was simply downloading the trainer directory on the Cloud Shell and not my local environment.
Now File Structure Looks Like:
estimator
|-- data
| |-- adult_data.csv
| |-- adult_test.csv
|-- output
|-- trainer
| |-- __init__.py
| |-- model.py
| |-- task.ipynb
| |-- task.py
answered Nov 19 at 17:33
Grant Hosticka
165318
165318
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378242%2fno-module-named-trainer-cloud-ml-engine-for-tensorflow-tutorial-running-locall%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Are you running this command from the
cloudml-samples-master/census/estimator
directory?– Dustin
Nov 19 at 16:44
I am running it on my computer from directory that includes the data and output folders. The tutorial seemed to specify downloading and running from the estimator directory in the cloud shell only, but perhaps I am misunderstanding.
– Grant Hosticka
Nov 19 at 16:57
1
You might have missed the "Download the code for this tutorial" step. You should have a
trainer
directory that is local to where you are executing thegcloud
command.– Dustin
Nov 19 at 17:05
That is the step I thought was only supposed to happen in the cloud shell but will try it locally as well, thanks.
– Grant Hosticka
Nov 19 at 17:11
1
It's not entirely clear, but the tutorial is assuming you're either doing this locally on your machine, or in Cloud Shell, not a mix of the two.
– Dustin
Nov 19 at 17:15