Skip to content
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

Packaging #256

Merged
merged 47 commits into from
May 4, 2023
Merged

Packaging #256

merged 47 commits into from
May 4, 2023

Conversation

annahedstroem
Copy link
Member

@annahedstroem annahedstroem commented Apr 26, 2023

Make Quantus more easily maintainable by dropping support for multiple versions and old packages.

  • Clarify requirements_test.txt.
  • Add 3.10 and 3.11 Python support
  • Update tensorflow version, fixing protobuf incompatibility
  • Check that optional dependencies packages are same as in requirements_test.txt
  • Clearn up setup.py file, including adding required and removing unnecessary imports

@annahedstroem annahedstroem changed the title update XAI packages and scikit-image Packaging Apr 26, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2023

Codecov Report

Merging #256 (57ebb5e) into main (d6368f9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #256   +/-   ##
=======================================
  Coverage   92.86%   92.87%           
=======================================
  Files          60       60           
  Lines        3196     3198    +2     
=======================================
+ Hits         2968     2970    +2     
  Misses        228      228           
Impacted Files Coverage Δ
...s/metrics/localisation/attribution_localisation.py 88.63% <ø> (ø)
...us/metrics/localisation/relevance_mass_accuracy.py 93.10% <ø> (ø)
quantus/functions/similarity_func.py 96.96% <100.00%> (+0.19%) ⬆️

@annahedstroem annahedstroem requested review from dkrako and leanderweber and removed request for dkrako April 26, 2023 17:00
Copy link
Collaborator

@dkrako dkrako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work in this commit.

At least the remaining debug print should be removed and probably the change to this pytest.mark of test_random_logit should be reverted again.

Regarding the dropping of py37 support, it's not completely clear to me why python 3.7 support was dropped.
Is it due to the bump up in the torch or tensorflow version?

If it's just because the incoming EOL status for 3.7 I wouldn't mind and support it at least to the point it really breaks.
If it's an issue because some of the required package versions are not available for python 3.7 or the protobuf stuff cannot be fixed easliy in python 3.7, then drop it as it's probably not worth the effort then.

If it's just for keeping the setup.py logic simpler, I'm ambivalent as I would rather be in favor of getting rid of most of the stuff in setup.py completely and migrate to a pyproject.toml. You can have nested extras there too: https://stackoverflow.com/questions/70969565/nest-or-combine-extras-require-for-setuptools-in-setup-cfg

Either way, I think at least some more pressing rationale is needed to completely and finally drop support.

According to https://pypistats.org/packages/quantus there still seem to be some downloads from python3.7 systems, although a very low number percentage-wise.

But just to be clear, I don't see dropping python 3.7 support as very problematic or a deal breaker as the Quantus users will have probably updated to newer versions a long time ago.

.github/workflows/python-package.yml Outdated Show resolved Hide resolved
tests/metrics/test_randomisation_metrics.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
tests/metrics/test_randomisation_metrics.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
@aaarrti
Copy link
Collaborator

aaarrti commented Apr 27, 2023

It looks like the changes duplicate the ones in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/253/files

@annahedstroem
Copy link
Member Author

Thanks so much @dkrako for many valid/ good points.

  • Print statements in tests are removed, thanks for noticing.
  • After considering your points, I've added back support for Python 3.7. The requirements_test.txt is therefore a bit longer, but if we want to drop it later this year, it would be easy to do so.
  • Also added 3.11 Python support now!

I think your point on migrating to pyproject.toml is a great idea, but would like to address this in separate PR. @aaarrti came quite a long way in doing so (PR: #253), and is work we definitely should do!

Will go ahead with a merge later today, thanks again!

@annahedstroem annahedstroem removed the request for review from leanderweber April 27, 2023 14:21
@annahedstroem
Copy link
Member Author

annahedstroem commented Apr 27, 2023

It looks like the changes duplicate the ones in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/253/files

Hi @aaarrti, this PR is a subset of the PR you have proposed in PR: #253. As I disagree with some of the changes, e.g., dropping 3.7 and then I want to address pyproject.toml file in a separate PR, it was easier to open one from scratch as it gave me more control over the content in the PR.

What I am hoping is to see that PR: #253 will address the improvements related to pyproject.toml separately!

Also, I did not include your improvement related to running black in CI/CD. So we can also do that in the PR you propose :D

Hope this makes sense!

Copy link
Member Author

@annahedstroem annahedstroem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's merge.

@annahedstroem annahedstroem merged commit ed052b1 into main May 4, 2023
@aaarrti aaarrti deleted the protobuf-fix branch June 7, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants