Skip to content

Commit

Permalink
Clean-up of environment code.
Browse files Browse the repository at this point in the history
  • Loading branch information
interpret-ml committed Sep 18, 2019
1 parent ef9caaa commit 4e47d45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions python/interpret-core/interpret/provider/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ def render(self, explanation, key=-1, **kwargs):

# Output to front-end/file
self._preserve_output(
explanation.name,
visual,
selector_key=key,
file_name=file_name,
**kwargs
explanation.name, visual, selector_key=key, file_name=file_name, **kwargs
)
return None

Expand Down
6 changes: 2 additions & 4 deletions python/interpret-core/interpret/utils/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ def _detect_ipython_zmq():
Returns:
True if called in IPython notebook or qtconsole.
"""

if _detect_ipython() is False:
return False

try:
from IPython import get_ipython

shell = get_ipython().__class__.__name__
if shell == "ZMQInteractiveShell":
return True # Jupyter notebook or qtconsole
Expand Down

0 comments on commit 4e47d45

Please sign in to comment.