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

Batch (parallelized) calculations of beta Shapley #428

Merged

Conversation

kosmitive
Copy link
Contributor

Description

This PR closes #427

Changes

  • Added batch_size parameter to compute_banzhaf_semivalues, compute_beta_shapley_semivalues, compute_shapley_semivalues and compute_generic_semivalues.

Checklist

  • Wrote Unit tests (if necessary)
  • Updated Documentation (if necessary)
  • Updated Changelog

@kosmitive kosmitive linked an issue Sep 5, 2023 that may be closed by this pull request
@kosmitive kosmitive force-pushed the feature/427-batch-parallelized-calculations-of-beta-shapley branch 2 times, most recently from 121ff42 to 0cdbc3e Compare September 5, 2023 23:15
…e_beta_shapley_semivalues`, `compute_shapley_semivalues` and `compute_generic_semivalues`.
@kosmitive kosmitive force-pushed the feature/427-batch-parallelized-calculations-of-beta-shapley branch from 0cdbc3e to 0914b66 Compare September 5, 2023 23:23
@kosmitive kosmitive self-assigned this Sep 5, 2023
@kosmitive kosmitive added enhancement New feature or request light task A light task labels Sep 5, 2023
@mdbenito
Copy link
Collaborator

mdbenito commented Sep 6, 2023

This might not be the right direction in which to go, even if it indeed helps in some situations. See my comments in the issue.

@mdbenito mdbenito assigned mdbenito and unassigned kosmitive Sep 7, 2023
AnesBenmerzoug
AnesBenmerzoug previously approved these changes Sep 8, 2023
Copy link
Collaborator

@AnesBenmerzoug AnesBenmerzoug left a comment

Choose a reason for hiding this comment

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

Looks good to me. @mdbenito do you still want to put comments saying that this is not final yet and it may be remove? If yes, where would you put them?

Copy link
Collaborator

@mdbenito mdbenito left a comment

Choose a reason for hiding this comment

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

@kosmitive After resolving conflicts, all that would be left to do is to very clearly document that batch size will be deprecated in the future. Note that adding the deprecation decorator generates a runtime warning but is not seen in the documentation, so please add it to the docstring as well.

src/pydvl/value/semivalues.py Outdated Show resolved Hide resolved
tests/value/utils.py Outdated Show resolved Hide resolved
tests/value/utils.py Outdated Show resolved Hide resolved
tests/value/test_semivalues.py Outdated Show resolved Hide resolved
tests/value/utils.py Outdated Show resolved Hide resolved
…parallelized-calculations-of-beta-shapley

# Conflicts:
#	tests/value/test_semivalues.py
@kosmitive kosmitive force-pushed the feature/427-batch-parallelized-calculations-of-beta-shapley branch from 5e56dd5 to 9083bc2 Compare September 11, 2023 00:41
@mdbenito mdbenito merged commit 55f0760 into develop Sep 18, 2023
12 checks passed
@mdbenito mdbenito deleted the feature/427-batch-parallelized-calculations-of-beta-shapley branch September 18, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request light task A light task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch (parallelized) calculations of beta Shapley
3 participants