interpretml / interpret

Fit interpretable models. Explain blackbox machine learning.
https://interpret.ml/docs
MIT License
6.22k stars 726 forks source link

Query on show() method. #172

Closed prateekiiest closed 1 year ago

prateekiiest commented 3 years ago

Hi,

For my case, after installing the package, the show Function doesnt seem to work and I get no output in the jupyter notebook.

I am currently running everything on my local notebook.

Kindly let me know if I am missing out something

interpret-ml commented 3 years ago

Hi @prateekiiest --

Which browser are you running this in? Could you please run your code in debug mode by putting the following at the top of your code, and send us the log at interpret@microsoft.com or paste it here?

from interpret.develop import debug_mode
debug_mode(log_filename='log.txt', log_level='INFO', native_debug=False)

-InterpretML team

lokijota commented 3 years ago

I'm actually also having this issue, and it's pretty random, but mostly I don't get an output.

I'm running the notebooks in an Azure ML Compute Instance VM (an NC6), using either Jupyter/JupyterLab or the default Notebook experience in AML, and sometimes I get a display out, sometimes I don't. The cells always run without errors. I've tried different browsers (Edge Dev and Edge Beta), and while I don't get errors in the browser console, like I said -- sometimes it shows everything and fully functional, but 99% of the times it doesn't, the show() just doesn't work.

I ran the command to log errors, all I get is a single entry:

2020-12-10 21:54:11,130 | develop.py           159                 debug_mode() | {
  "interpret.__version__": "0.2.1",
  "interpret.status_show_server": {
    "app_runner_exists": false
  },
  "interpret.static_system_info": {
    "platform": "Linux-4.15.0-1100-azure-x86_64-with-debian-stretch-sid",
    "platform.architecture": [
      "64bit",
      ""
    ],
    "platform.machine": "x86_64",
    "platform.processor": "x86_64",
    "platform.python_version": "3.6.9",
    "platform.release": "4.15.0-1100-azure",
    "platform.system": "Linux",
    "platform.version": "#111~16.04.1-Ubuntu SMP Thu Nov 19 06:49:21 UTC 2020",
    "psutil.logical_cpu_count": 6,
    "psutil.physical_cpu_count": 6,
    "psutil.virtual_memory.total": "55.0GiB",
    "psutil.swap_memory.total": "0.0B"
  },
  "interpret.dynamic_system_info": {
    "psutil.virtual_memory": {
      "total": "55.0GiB",
      "available": "52.7GiB",
      "percent": 4.3,
      "used": "1.7GiB",
      "free": "51.2GiB",
      "active": "1.9GiB",
      "inactive": "1.1GiB",
      "buffers": "214.0MiB",
      "cached": "1.9GiB",
      "shared": "8.7MiB",
      "slab": "361.1MiB"
    },
    "psutil.swap_memory": {
      "total": "0.0B",
      "used": "0.0B",
      "free": "0.0B",
      "percent": 0.0,
      "sin": "0.0B",
      "sout": "0.0B"
    },
    "psutil.avg_cpu_percent": 0.16666666666666666,
    "psutil.std_cpu_percent": 0.372677996249965,
    "psutil.cpu_freq": {
      "current": 2596.992,
      "min": 0.0,
      "max": 0.0
    }
  }
}

Happy to help diagnosing this (also, I'm an FTE).

prateekiiest commented 3 years ago

Hi, sorry for the late update. running the command returns me the same log messages as @lokijota's

prateekiiest commented 3 years ago

my log file

INFO - {
  "interpret.__version__": "0.2.1",
  "interpret.status_show_server": {
    "app_runner_exists": false
  },
  "interpret.static_system_info": {
    "platform": "Windows-10-10.0.18362-SP0",
    "platform.architecture": [
      "64bit",
      "WindowsPE"
    ],
    "platform.machine": "AMD64",
    "platform.processor": "Intel64 Family 6 Model 126 Stepping 5, GenuineIntel",
    "platform.python_version": "3.6.10",
    "platform.release": "10",
    "platform.system": "Windows",
    "platform.version": "10.0.18362",
    "psutil.logical_cpu_count": 8,
    "psutil.physical_cpu_count": 4,
    "psutil.virtual_memory.total": "7.8GiB",
    "psutil.swap_memory.total": "19.3GiB"
  },
  "interpret.dynamic_system_info": {
    "psutil.virtual_memory": {
      "total": "7.8GiB",
      "available": "1.6GiB",
      "percent": 79.0,
      "used": "6.2GiB",
      "free": "1.6GiB"
    },
    "psutil.swap_memory": {
      "total": "19.3GiB",
      "used": "12.1GiB",
      "free": "7.2GiB",
      "percent": 62.6,
      "sin": "0.0B",
      "sout": "0.0B"
    },
    "psutil.avg_cpu_percent": 4.825,
    "psutil.std_cpu_percent": 4.702858173494072,
    "psutil.cpu_freq": {
      "current": 991.0,
      "min": 0.0,
      "max": 1190.0
    }
  }
}
INFO - EBM lib loading.
INFO - Loading native on win32 | debug = False

And I am running on Edge and Chrome both. Same issue

prateekiiest commented 3 years ago

also running on jupyter notebook locally, but still shows Cloud env detected, which is odd.

Cloud environment detected (['azureml', 'ipython-zmq', 'ipython'])

References

https://github.com/interpretml/interpret/blob/bbe4db762f4c66f3007d24686844e552fd3908b0/python/interpret-core/interpret/provider/visualize.py#L40

https://github.com/interpretml/interpret/blob/bbe4db762f4c66f3007d24686844e552fd3908b0/python/interpret-core/interpret/utils/environment.py#L102 @lokijota are you getting the same info during running on jupyter locally.

lokijota commented 3 years ago

Hi @prateekiiest . Yes, I am.

interpret-ml commented 3 years ago

Hi @prateekiiest and @lokijota ,

Thanks for bringing this to our attention! If either or both of you are available to help us debug this, we might be able to find a quicker solution. We'll shoot you an email and find some time to figure this out.

-InterpretML Team

prateekiiest commented 3 years ago

Sure. I am happy to volunteer

lokijota commented 3 years ago

Yeah, happy to help. I'm an FTE, just ping me on Teams.

prateekiiest commented 3 years ago

sure me too. you can find me on teams

prateekiiest commented 3 years ago

Hi @interpret-ml, is the Azure ML issue fixed via https://github.com/interpretml/interpret/pull/195?

nswitanek commented 3 years ago

I've found that show() will render a widget in the notebooks in Azure Machine Learning at ml.azure.com, but show() will not render widgets in Jupyter notebooks running on AML compute instances.

Here is the debug log file run in a Jupyter notebook:

2021-02-18 18:51:54,430 | develop.py 159 debug_mode() | { "interpret.version": "0.2.4", "interpret.status_show_server": { "app_runner_exists": false }, "interpret.static_system_info": { "platform": "Linux-4.15.0-1098-azure-x86_64-with-debian-stretch-sid", "platform.architecture": [ "64bit", "" ], "platform.machine": "x86_64", "platform.processor": "x86_64", "platform.python_version": "3.6.9", "platform.release": "4.15.0-1098-azure", "platform.system": "Linux", "platform.version": "#109~16.04.1-Ubuntu SMP Wed Sep 30 18:53:14 UTC 2020", "psutil.logical_cpu_count": 4, "psutil.physical_cpu_count": 4, "psutil.virtual_memory.total": "13.7GiB", "psutil.swap_memory.total": "0.0B" }, "interpret.dynamic_system_info": { "psutil.virtual_memory": { "total": "13.7GiB", "available": "4.4GiB", "percent": 67.6, "used": "8.8GiB", "free": "1.2GiB", "active": "10.2GiB", "inactive": "1.5GiB", "buffers": "614.2MiB", "cached": "3.0GiB", "shared": "139.4MiB", "slab": "423.4MiB" }, "psutil.swap_memory": { "total": "0.0B", "used": "0.0B", "free": "0.0B", "percent": 0.0, "sin": "0.0B", "sout": "0.0B" }, "psutil.avg_cpu_percent": 0.75, "psutil.std_cpu_percent": 0.4330127018922193, "psutil.cpu_freq": { "current": 2294.687, "min": 0.0, "max": 0.0 } } } 2021-02-18 18:51:54,430 | internal.py 36 get_native_singleton() | EBM lib loading. 2021-02-18 18:51:54,431 | internal.py 359 _get_ebm_lib_path() | Loading native on linux | debug = False

prateekiiest commented 3 years ago

PR #210 would seem to fix this issue @lokijota @nswitanek.

paulbkoch commented 1 year ago

I've merged the fix that @prateekiiest submitted as a PR. Thanks prateekiiest!