-
Notifications
You must be signed in to change notification settings - Fork 50
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
Craft integration #134
Craft integration #134
Conversation
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.
- craft.md: I think it will be good to describe a little bit the method before starting to said what the method shall requires
- I think craft package shall support Pytorch model thanks to the pytorch wrapper developed. I think with little effort, it can be done with craft package.
- visualization function shall be develop too and a tutorial illustrating the usage of the method on imagenet will be very useful.
- I will change the name craft_tf by craft
11ae00a
to
472f2d3
Compare
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.
Technically it looks wonderful! I mean the code is really neat and quite clear. I added some questions and remarks on those points but I had really a few points. However, there is for now 2 major drawbacks:
- I think the tests are not appropriate, in the sense that considering the methods at stake they should be more developped
- It misses documentation for both ACE and ICE + the format of the docstring is not harmonized with the other methods.
Anyway, it is still an impressive work and the harder is done, congrats for that 🔥
6512d24
to
6060b32
Compare
Rebased on master |
a88c2b7
to
8b0e844
Compare
I repushed because I forgot to add the links to the paper + notebook in craft.md ... |
7cbb98c
to
daade88
Compare
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.
Amazing work to adapt Craft code for it to be ready for packaging. It is nice to have both tensorflow and pytorch versions !
I made several comments but I did not finish my review as I did not read the tutorials yet, I will do it tomorrow. Furthermore, I do not have a deep understanding of the method so my remarks are more high-level.
Finally, it seems that your code did not pass the test workflow. You should use pylint xplique
and pytest
commands to verify you code will pass the workflow.
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.
Great job again, the plots are really pertinent!
However, the documentation is a bit lacking and I have a few remarks on the tutorials:
- When you make a command line in a notebook, make sure to add the quiet argument to reduce verbosity (-q for the pip install).
- The tutorials should be added to the Xplique Google Drive to be with the others.
- Some plot functions are called for each image separately and thus they plot the result in one column. I think it hinders fluidity.
- One thing I like from other tutorials is that we quickly get an example of results. Here I would make a cell with the fewest lines possible to obtain the all-in-one
plot_image_concepts
plot. Then describe the steps as you do now. - In fact, I would add a quick general description of the method with a schema at the top as done in other unit tutorials, for example for Rise: https://colab.research.google.com/drive/1icu2b1JGfpTRa-ic8tBSXnqqfuCGW2mO.
- You do not appear as an Author, are you not the author of the tutorials? (The Author line does not correspond to the papers' authors).
- You did not put the Xpliqe logo at the top of the tutorials.
Nonetheless, those tutorials show awesome results and how easy it is to get them through the API so great work.
Feel free to come see me if you want to discuss my remarks.
b61335f
to
30f08e3
Compare
It seems that the tests are failing because you used the On the other hands, it also fails for craft torch because with the general test |
78dc7c0
to
2d57e70
Compare
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.
Amazing work, the PR is close to being merged!
Signed-off-by: Frederic Boisnard <[email protected]>
84ab077
to
3310f92
Compare
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 team!
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.
Well done!
e685835
to
1763c5e
Compare
Signed-off-by: Frederic Boisnard <[email protected]>
Signed-off-by: Frederic Boisnard <[email protected]>
Signed-off-by: Frederic Boisnard <[email protected]>
1763c5e
to
86b4cb0
Compare
This PR contains the integration of CRAFT in xplique.
The 4 first commits are related to the source code, the last one is about the documentation.
Base classes (1st patch of this PR: 5bfb885)
xplique/concepts/base.py : introduces base classes that will be used by current Craft classes, and potentially future other concepts methods such as ACE & ICE. In particular it contains the following base classes:
Craft classes (2nd patch of the PR: 3327cac)
xplique/concepts/craft.py : this file contains the majority of the code for CRAFT. It contains the following classes:
xplique/concepts/craft_tf.py: contains Tensorflow specific implementations: CraftTf and CraftManagerTf.
xplique/concepts/craft_torch.py: contains Pytorch specific implementations: CraftTorch and CraftManagerTorch.
Tests organization (3rd patch: a5a8055)
There are 3 main tests methods which are adapted for Tensorflow and Pytorch in these files:
Here is the list of those tests:
Documentation (4rth patch: 487d3bb)
The documentation is split among the following files: