h2o version incompatibility in loading the saved model.

979 views
Skip to first unread message

Neeraj Kumar

unread,
Oct 4, 2017, 3:09:52 PM10/4/17
to H2O Open Source Scalable Machine Learning - h2ostream
Hi All, 

I have a very specific question with respect to h2o model loading in R. I created a deep learning model in R with version 3.10.5.2, and saved the model for production purpose to run on my new incoming data. However when I upgrade the version to 3.14.0.3 , I am not able to load or use the model due to incompatibility. Is there any way around for it, or the version mismatch is the issue known, if yes, what are the possible options. DO I need to re-train the model with new version of h2o, which does not make sense. Any help appreciated.

Here is the error- "ERROR MESSAGE:
Found version 3.10.5.2, but running version 3.14.0.3"


Thank you
Neeraj

Erin LeDell

unread,
Oct 4, 2017, 4:20:30 PM10/4/17
to Neeraj Kumar, H2O Open Source Scalable Machine Learning - h2ostream, Angela Bartz

Hi Neeraj,

H2O binary models are not compatible across major versions.  Yes, you will need to re-train the models to use them in 3.14.*  I am not sure why you think this doesn't make sense...  For binary models, this is the standard practice -- you will have the same situation if you use scikit-learn, for example.

We will make sure to add this to the docs, because I don't see this noted in our user guide: http://docs.h2o.ai/h2o/latest-stable/h2o-docs/save-and-load-model.html 

If you want to use MOJO/POJO models in production, those are not tied to a particular version of H2O since they are just plain Java code and do not require the H2O cluster to be running.  Sounds like that's what you want to be doing.  http://docs.h2o.ai/h2o/latest-stable/h2o-docs/productionizing.html

-Erin

--
You received this message because you are subscribed to the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Erin LeDell Ph.D.
Statistician & Machine Learning Scientist | H2O.ai

Neeraj Kumar

unread,
Nov 8, 2017, 2:34:55 PM11/8/17
to h2os...@googlegroups.com, ang...@h2o.ai

---------- Forwarded message ----------
From: Neeraj Kumar <nek...@mix.wvu.edu>
Date: Wed, Nov 8, 2017 at 2:34 PM
Subject: Re: [h2ostream] h2o version incompatibility in loading the saved model.
To: Erin LeDell <er...@h2o.ai>


Hi Erin,

Thank you for replying back. It makes sense and I am using  MOJO/POJO models in production now, however one very critical issue I am not able to tackle. I can definitely remove temp objects in h2o instances using h2o.rm and h2o.removeAll() but it does not clear the memory usage from h2o. So lets say if I start the instance and call my model and do some work, the memory goes from 0 to 50%, which is okay but even after removing the objects and model it does not go back to 0%.

I was reading in trouble shooting doc for R which gave example of garbage collection, however that does not seem to work either.

I am using this right after I have removed the objects from h2o instances from R.

.h2o.garbageCollect <- function() {
         res <- .h2o.__remoteSend("GarbageCollect", method = "POST")
     }
    h2o:::.h2o.garbageCollect()
    h2o:::.h2o.garbageCollect()
    h2o:::.h2o.garbageCollect()

Any suggestion would be greatly appreciated. 

Thank you
Neeraj


To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Erin LeDell

unread,
Nov 9, 2017, 2:45:58 AM11/9/17
to Neeraj Kumar, h2os...@googlegroups.com

Your code below should work.

-Erin


On 11/8/17 11:34 AM, Neeraj Kumar wrote:
Hi Erin,

Thank you for replying back. It makes sense and I am using  MOJO/POJO models in production now, however one very critical issue I am not able to tackle. I can definitely remove temp objects in h2o instances using h2o.rm and h2o.removeAll() but it does not clear the memory usage from h2o. So lets say if I start the instance and call my model and do some work, the memory goes from 0 to 50%, which is okay but even after removing the objects and model it does not go back to 0%.

I was reading in trouble shooting doc for R which gave example of garbage collection, however that does not seem to work either.

I am using this right after I have removed the objects from h2o instances from R.

.h2o.garbageCollect <- function() {
         res <- .h2o.__remoteSend("GarbageCollect", method = "POST")
     }
    h2o:::.h2o.garbageCollect()
    h2o:::.h2o.garbageCollect()
    h2o:::.h2o.garbageCollect()

Any suggestion would be greatly appreciated. 

Thank you
Neeraj

On Oct 4, 2017 4:20 PM, "Erin LeDell" <er...@h2o.ai> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

-- 
Erin LeDell Ph.D.
Statistician & Machine Learning Scientist | H2O.ai
Reply all
Reply to author
Forward
0 new messages