interpretml / interpret-text

A library that incorporates state-of-the-art explainers for text-based machine learning models and visualizes the result with a built-in dashboard.
MIT License
413 stars 68 forks source link

The sample notebook doesn't work on machines with CUDA capability #150

Open ceshine opened 3 years ago

ceshine commented 3 years ago

I got this error when trying to run the Introspective Rationale Explainer Sample Notebook:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

After some preliminary investigation, the problem seems to be this line. It ignores the self.args.cuda parameter and decides whether to put the z mask purely based on where CUDA is available.