AttributeError: 'H2OAutoML' object has no attribute 'explain'

Description

Hello,

As described in docs (http://docs.h2o.ai/h2o/latest-stable/h2o-docs/explain.html) there is H2O Explainability Interface which I try to use, but I got "AttributeError: 'H2OAutoML' object has no attribute 'explain'".

Here is code from example:

I have checked that this issue report already in https://h2oai.atlassian.net/browse/PUBDEV-7850. It says that h2o.explain is available since 3.32.0.1 but I have installed 3.32.0.2.

I have tried to install library via conda/pip with no luck.

Is this function available to use now?

Thank you.

Activity

Show:
Tomas Fryda
January 29, 2021, 10:53 AM

I was able to replicate this only when I did’t have matplotlib installed (which is required by the explain module). I think in 3.32.0.3 we throw an exception about Matplotlib but not in 3.32.0.2 - explain module just doesn’t get loaded when matplotlib is missing so the explain method is not registered => AttributeError: 'H2OAutoML' object has no attribute 'explain'

Is it possible that it was missing matplotlib in your case as well? H2O doesn’t depend on it (since you don’t need to have it in headless environments) so you would have to install it manually.

I looked at the differences between 3.32.0.1 and 3.32.0.2 and there was just one bug fix of a histogram in the background of PDP plots. In 3.32.0.3, I changed the behavior - explain module gets registered even if you don’t have matplotlib but if you don’t have it it will fail on invocation.

Erin LeDell
January 29, 2021, 6:56 AM

This has been verified to be working (in 3.32.0.3).

Sergei Ten
January 29, 2021, 3:54 AM

Hello Erin,

Thank you for looking at this issue.

I have just upgraded to 3.32.0.3 and can confirm that it’s working well.

Thank you again

Erin LeDell
January 29, 2021, 3:40 AM

Can you upgrade to 3.32.0.3 to see if it’s working? It should be working in 3.32.0.2, but just as a test, if you can try .3, that would be helpful.

Erin LeDell
January 29, 2021, 3:39 AM

Can you show the output of h2o.init() when you start the H2O cluster (so I can verify the version)? I don’t know why it would be missing unless it’s not the right version…

Right now the version available via pip is 3.32.0.3.

Cannot Reproduce

Assignee

Erin LeDell

Fix versions

None

Reporter

Sergei Ten

Support ticket URL

None

Labels

None

Affected Spark version

None

Customer Request Type

None

Task progress

None

ReleaseNotesHidden

None

CustomerVisible

No

Components

Affects versions

Priority

Major