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;








1















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.










share|improve this question






















  • 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

















1















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.










share|improve this question






















  • 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













1












1








1








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 13:42









AjrAjr

1615 bronze badges




1615 bronze badges












  • 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

















  • 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
















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












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
);



);













draft saved

draft discarded


















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.



















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현