-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notebooks #584
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Btw, the colab buttons point to the notebooks in the main branch, so before this is merged they won't work. |
@@ -13,6 +13,35 @@ | |||
"DIANNA is a Python package that brings explainable AI (XAI) to your research project. It wraps carefully selected XAI methods in a simple, uniform interface. It's built by, with and for (academic) researchers and research software engineers working on machine learning projects." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #4. !python3 -m pip install dianna
I think you will want to install all the notebook dependencies for dianna here (and all the other notebooks too).
!python3 -m pip install dianna[notebooks]
If this turns out to be a bottleneck, you could consider specifying the additional requirements here directly (e.g. spacy
).
!python3 -m pip install dianna spacy
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good point, it seems that everything we need is installed by default in Colab, but I suppose it's cleaner to add it to be sure, it doesn't take much time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, let's see how this works when it gets merged.
I added a small comment about the table in the readme, which is a bit difficult to read.
While Github was down I was playing with wget
. You can use -P
to tell wget
the directory to put the file you are retrieving. Saves a couple of lines :-)
for path in paths_to_download:
!wget {base_url + path} -P {os.path.dirname(path)}
## Colab | ||
The tutorials can also be run directly in Google Colab, by clicking on the buttons below, or for a general demo here: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/dianna-ai/dianna/blob/main/tutorials/demo.ipynb). | ||
|
||
| modality \ method | RISE | LIME | KernelSHAP | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the table, but as a user all the Open in Colab buttons do not help me identify the notebooks. Could you change these to reflect the title or theme of the notebook?
I don't think it's possible to customize the badges (maybe https://shields.io has some). Otherwise, could you just put the link, for example:
I've made all the notebooks in the tutorials folder runnable from colab, by adding at the start of each of them the code block below, only varying the
paths_to_download
between them. I did this rather than cloning the entire repo as the latter took the setup time from almost 1 to almost 2 minutes.In lime_images, the example image uses a variable
true_species
suggesting other options, but in the data there is only the one given, so I hardcoded the colab setup to download that one.I've tested that they all run on colab. Having some issues running some locally, mostly complaints that lime doesn't exist, but that must be something outdated in my environment, as nothing changed when it runs locally.
Also added links on the tutorial page.