How to deploy a model trained with a custom package on Google ML Engine?Manage scikit-learn model in Google Cloud PlatformCan't train my Tensorflow detector model in Google CloudGcloud ml-engine: FAILED_PRECONDITION: Field: package_uris ErrorGoogle Machine Learning Engine Python 3Get the path of saved_model.pb after training on ML engineError creating model version using “gcloud ml-engine versions create”Google Cloud ML returns empty predictions with object detection modelTPOT model in google ml-engineGoogle Cloud Platform, Ml Engine, No module named sklearn_crfsuite.estimatorWhy does google ml-engine online predict return a different prediction from local predict?
Strange LED behavior: Why is there a voltage over the LED with only one wire connected to it?
German phrase for 'suited and booted'
What kind of anatomy does a centaur have?
Killing a star safely
Has Peter Parker ever eaten bugs?
Why can't a country print its own money to spend it only abroad?
Why did modems have speakers?
Why is DC so, so, so Democratic?
Xcode 10.3 Installation
Why does the salt in the oceans not sink to the bottom?
How can I show that the speed of light in vacuum is the same in all reference frames?
Do you have to hide in order for other creatures to not know your location inside a fog cloud?
What is "It is x o'clock" in Japanese with subject
Are gangsters hired to attack people at a train station classified as a terrorist attack?
Can I make an Opportunity Attack during Time Stop?
Is there a way to shorten this while condition?
Short story where a flexible reality hardens to an unchanging one
Arduino Bluetooth communication is slowing down because of the 'for' loop!
Impact of throwing away fruit waste on a peak > 3200 m above a glacier
Why is the UH-60 tail rotor canted?
How can I calculate the cost of Skyss bus tickets
Can we have too many dialogue tags and follow up actions?
Giving blur shadow to plot
Is it better to merge "often" or only after completion do a big merge of feature branches?
How to deploy a model trained with a custom package on Google ML Engine?
Manage scikit-learn model in Google Cloud PlatformCan't train my Tensorflow detector model in Google CloudGcloud ml-engine: FAILED_PRECONDITION: Field: package_uris ErrorGoogle Machine Learning Engine Python 3Get the path of saved_model.pb after training on ML engineError creating model version using “gcloud ml-engine versions create”Google Cloud ML returns empty predictions with object detection modelTPOT model in google ml-engineGoogle Cloud Platform, Ml Engine, No module named sklearn_crfsuite.estimatorWhy does google ml-engine online predict return a different prediction from local predict?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm able to train a scikit-learn model that includes custom functions on Google ML Engine with a call like this:
gcloud ml-engine jobs submit training "module_name"
--job-dir gs://my_bucket/scikit_learn_job_dir
--package-path ./my_package/
--module-name my_package.trainer.train
--region us-east1
--runtime-version='1.12'
--python-version='3.5'
--scale-tier BASIC
This code trains the model and uploads a pickle file, model.pkl
to gs://my_bucket/models
.
However, I get an error when trying to deploy with :
gcloud ml-engine versions create "version_name"
--model model_name
--origin gs://my_bucket/models
--runtime-version='1.12'
--framework "SCIKIT_LEARN"
--python-version='3.5'
The error says that my_package
cannot be loaded. Indeed, I can't find any option equivalent to --package-path
in the version create
command documentation.
python scikit-learn google-cloud-ml
add a comment |
I'm able to train a scikit-learn model that includes custom functions on Google ML Engine with a call like this:
gcloud ml-engine jobs submit training "module_name"
--job-dir gs://my_bucket/scikit_learn_job_dir
--package-path ./my_package/
--module-name my_package.trainer.train
--region us-east1
--runtime-version='1.12'
--python-version='3.5'
--scale-tier BASIC
This code trains the model and uploads a pickle file, model.pkl
to gs://my_bucket/models
.
However, I get an error when trying to deploy with :
gcloud ml-engine versions create "version_name"
--model model_name
--origin gs://my_bucket/models
--runtime-version='1.12'
--framework "SCIKIT_LEARN"
--python-version='3.5'
The error says that my_package
cannot be loaded. Indeed, I can't find any option equivalent to --package-path
in the version create
command documentation.
python scikit-learn google-cloud-ml
So the job is submitted/queued inML Engine
right? It would be super helpful if you could post your error logs from jobs inML Engine
.
– Pramesh Bajracharya
Mar 26 at 13:53
Hello! The job is submitted in ML Engine and works fine. Themodel.pkl
file is created and uploaded to GCS. The problem is when I create a model version from this .pkl file. The version has a red dot instead of a blue check mark and in the version details, the error is "Create Version failed. Bad model detected with error: "Failed to load model: Could not load the model: /tmp/model/0001/model.pkl. No module named 'my_package'. (Error code: 0)". This was expected, because I didn't sendmy_package
with theversion create
call, but I didn't find how to!
– Ajr
Apr 2 at 2:12
add a comment |
I'm able to train a scikit-learn model that includes custom functions on Google ML Engine with a call like this:
gcloud ml-engine jobs submit training "module_name"
--job-dir gs://my_bucket/scikit_learn_job_dir
--package-path ./my_package/
--module-name my_package.trainer.train
--region us-east1
--runtime-version='1.12'
--python-version='3.5'
--scale-tier BASIC
This code trains the model and uploads a pickle file, model.pkl
to gs://my_bucket/models
.
However, I get an error when trying to deploy with :
gcloud ml-engine versions create "version_name"
--model model_name
--origin gs://my_bucket/models
--runtime-version='1.12'
--framework "SCIKIT_LEARN"
--python-version='3.5'
The error says that my_package
cannot be loaded. Indeed, I can't find any option equivalent to --package-path
in the version create
command documentation.
python scikit-learn google-cloud-ml
I'm able to train a scikit-learn model that includes custom functions on Google ML Engine with a call like this:
gcloud ml-engine jobs submit training "module_name"
--job-dir gs://my_bucket/scikit_learn_job_dir
--package-path ./my_package/
--module-name my_package.trainer.train
--region us-east1
--runtime-version='1.12'
--python-version='3.5'
--scale-tier BASIC
This code trains the model and uploads a pickle file, model.pkl
to gs://my_bucket/models
.
However, I get an error when trying to deploy with :
gcloud ml-engine versions create "version_name"
--model model_name
--origin gs://my_bucket/models
--runtime-version='1.12'
--framework "SCIKIT_LEARN"
--python-version='3.5'
The error says that my_package
cannot be loaded. Indeed, I can't find any option equivalent to --package-path
in the version create
command documentation.
python scikit-learn google-cloud-ml
python scikit-learn google-cloud-ml
asked Mar 26 at 13:42
AjrAjr
1615 bronze badges
1615 bronze badges
So the job is submitted/queued inML Engine
right? It would be super helpful if you could post your error logs from jobs inML Engine
.
– Pramesh Bajracharya
Mar 26 at 13:53
Hello! The job is submitted in ML Engine and works fine. Themodel.pkl
file is created and uploaded to GCS. The problem is when I create a model version from this .pkl file. The version has a red dot instead of a blue check mark and in the version details, the error is "Create Version failed. Bad model detected with error: "Failed to load model: Could not load the model: /tmp/model/0001/model.pkl. No module named 'my_package'. (Error code: 0)". This was expected, because I didn't sendmy_package
with theversion create
call, but I didn't find how to!
– Ajr
Apr 2 at 2:12
add a comment |
So the job is submitted/queued inML Engine
right? It would be super helpful if you could post your error logs from jobs inML Engine
.
– Pramesh Bajracharya
Mar 26 at 13:53
Hello! The job is submitted in ML Engine and works fine. Themodel.pkl
file is created and uploaded to GCS. The problem is when I create a model version from this .pkl file. The version has a red dot instead of a blue check mark and in the version details, the error is "Create Version failed. Bad model detected with error: "Failed to load model: Could not load the model: /tmp/model/0001/model.pkl. No module named 'my_package'. (Error code: 0)". This was expected, because I didn't sendmy_package
with theversion create
call, but I didn't find how to!
– Ajr
Apr 2 at 2:12
So the job is submitted/queued in
ML Engine
right? It would be super helpful if you could post your error logs from jobs in ML Engine
.– Pramesh Bajracharya
Mar 26 at 13:53
So the job is submitted/queued in
ML Engine
right? It would be super helpful if you could post your error logs from jobs in ML Engine
.– Pramesh Bajracharya
Mar 26 at 13:53
Hello! The job is submitted in ML Engine and works fine. The
model.pkl
file is created and uploaded to GCS. The problem is when I create a model version from this .pkl file. The version has a red dot instead of a blue check mark and in the version details, the error is "Create Version failed. Bad model detected with error: "Failed to load model: Could not load the model: /tmp/model/0001/model.pkl. No module named 'my_package'. (Error code: 0)". This was expected, because I didn't send my_package
with the version create
call, but I didn't find how to!– Ajr
Apr 2 at 2:12
Hello! The job is submitted in ML Engine and works fine. The
model.pkl
file is created and uploaded to GCS. The problem is when I create a model version from this .pkl file. The version has a red dot instead of a blue check mark and in the version details, the error is "Create Version failed. Bad model detected with error: "Failed to load model: Could not load the model: /tmp/model/0001/model.pkl. No module named 'my_package'. (Error code: 0)". This was expected, because I didn't send my_package
with the version create
call, but I didn't find how to!– Ajr
Apr 2 at 2:12
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2f55358634%2fhow-to-deploy-a-model-trained-with-a-custom-package-on-google-ml-engine%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f55358634%2fhow-to-deploy-a-model-trained-with-a-custom-package-on-google-ml-engine%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
So the job is submitted/queued in
ML Engine
right? It would be super helpful if you could post your error logs from jobs inML Engine
.– Pramesh Bajracharya
Mar 26 at 13:53
Hello! The job is submitted in ML Engine and works fine. The
model.pkl
file is created and uploaded to GCS. The problem is when I create a model version from this .pkl file. The version has a red dot instead of a blue check mark and in the version details, the error is "Create Version failed. Bad model detected with error: "Failed to load model: Could not load the model: /tmp/model/0001/model.pkl. No module named 'my_package'. (Error code: 0)". This was expected, because I didn't sendmy_package
with theversion create
call, but I didn't find how to!– Ajr
Apr 2 at 2:12