The .getAlgo() Method of Pysparkling H2OGridSearch Throws Exception

Description

It happens if getAlgo() is called for the third time and more.

>>> from pysparkling.ml import H2OGridSearch, H2OGBM

>>> grid = H2OGridSearch(labelCol="AGE", hyperParameters={"_seed": [1, 2, 3]}, splitRatio=0.8, algo=H2OGBM(), strategy="RandomDiscrete", maxModels=3, maxRuntimeSecs=60, selectBestModelBy="RMSE")

>>> grid.getAlgo()

H2OGBM_8fe5b86812f7

>>> grid.getAlgo()

H2OGBM_8fe5b86812f7

>>> grid.getAlgo()

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/private/var/folders/90/mnytclln4yxcykll81knhmzm0000gn/T/spark-f4cdaf5d-e18a-4699-8dfd-3e86f9339b76/userFiles-76281c45-e743-4c79-addf-18f4611d9d13/h2o_pysparkling_2.4-3.32.0.1-1-2.4.zip/ai/h2o/sparkling/ml/params/H2OGridSearchParams.py", line 95, in getAlgo

File "/Users/marek/software/spark/spark-2.4.4-bin-hadoop2.7/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 1257, in __call__

File "/Users/marek/software/spark/spark-2.4.4-bin-hadoop2.7/python/pyspark/sql/utils.py", line 63, in deco

return f(*a, **kw)

File "/Users/marek/software/spark/spark-2.4.4-bin-hadoop2.7/python/lib/py4j-0.10.7-src.zip/py4j/protocol.py", line 332, in get_return_value

py4j.protocol.Py4JError: An error occurred while calling o80.parameters. Trace:

py4j.Py4JException: Target Object ID does not exist for this gateway :o80

at py4j.Gateway.invoke(Gateway.java:279)

at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)

at py4j.commands.CallCommand.execute(CallCommand.java:79)

at py4j.GatewayConnection.run(GatewayConnection.java:238)

at java.lang.Thread.run(Thread.java:748)

or if the algo set via the setter.

>>> from pysparkling.ml import H2OGridSearch, H2OGBM, H2OGLM

>>> grid = H2OGridSearch(labelCol="AGE", hyperParameters={"_seed": [1, 2, 3]}, splitRatio=0.8, algo=H2OGBM(), strategy="RandomDiscrete", maxModels=3, maxRuntimeSecs=60, selectBestModelBy="RMSE")

>>> grid.getAlgo()

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/private/var/folders/90/mnytclln4yxcykll81knhmzm0000gn/T/spark-f4cdaf5d-e18a-4699-8dfd-3e86f9339b76/userFiles-76281c45-e743-4c79-addf-18f4611d9d13/h2o_pysparkling_2.4-3.32.0.1-1-2.4.zip/ai/h2o/sparkling/ml/params/H2OGridSearchParams.py", line 95, in getAlgo

File "/Users/marek/software/spark/spark-2.4.4-bin-hadoop2.7/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 1257, in __call__

File "/Users/marek/software/spark/spark-2.4.4-bin-hadoop2.7/python/pyspark/sql/utils.py", line 63, in deco

return f(*a, **kw)

File "/Users/marek/software/spark/spark-2.4.4-bin-hadoop2.7/python/lib/py4j-0.10.7-src.zip/py4j/protocol.py", line 332, in get_return_value

py4j.protocol.Py4JError: An error occurred while calling o2403.parameters. Trace:

py4j.Py4JException: Target Object ID does not exist for this gateway :o2403

at py4j.Gateway.invoke(Gateway.java:279)

at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)

at py4j.commands.CallCommand.execute(CallCommand.java:79)

at py4j.GatewayConnection.run(GatewayConnection.java:238)

at java.lang.Thread.run(Thread.java:748)

Assignee

Jakub Hava

Reporter

Marek Novotny

Labels

None

CustomerVisible

No

testcase 1

None

testcase 2

None

testcase 3

None

h2ostream link

None

Affected Spark version

None

AffectedContact

None

AffectedCustomers

None

AffectedPilots

None

AffectedOpenSource

None

Support Assessment

None

Customer Request Type

None

Support ticket URL

None

End date

None

Baseline start date

None

Baseline end date

None

Task progress

None

Task mode

None

ReleaseNotesHidden

None

Fix versions

Priority

Major
Configure