This relates to the h2o package in R. I'm working with multiple jobs running in parallel, some may come in later than others. Is it possible to detect whether a h2o instance already exists and make a connection to that instance.
I see that if I know an instance is already running, i just do h2o.init(startH2O=FALSE)
, but what if I don't know that?
Just do
h2o.init(startH2O=FALSE)
and if it fails you know it wasn't running.(Alternatively, you could make your own curl request to port 54321, and see if there is a reply.)
When you say "multiple jobs running in parallel", do you mean one instance of H2O, and it is making 2+ models at the same time? Or do you mean you are running 2+ instances of H2O, on a single machine, on different ports? If the latter, give the port number of interest to your
h2o.init()
call (but make sure you use the most recent version, theport
arg was ignored until Nov 18th 2016: https://github.com/h2oai/h2o-3/pull/401 )