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

Fix map_reduce calls with utility and add tests #44

Closed
Xuzzo opened this issue May 31, 2022 · 2 comments
Closed

Fix map_reduce calls with utility and add tests #44

Xuzzo opened this issue May 31, 2022 · 2 comments
Assignees
Labels
accepted This enhancement or bug report has been accepted as valid bug Something isn't working testing Writing and verifying tests (unit or otherwise)

Comments

@Xuzzo
Copy link
Collaborator

Xuzzo commented May 31, 2022

In many examples and tests map_reduce is passed a utility, but this works only when num_jobs <= num_runs. When num_jobs > num_runs, data being a Utility is not supported. Considering we probably want to keep data a simple collection, find a way around calling map_reduce with a utility and test it.

See, e.g. this discussion

Once fixed, unify interface in montecarlo methods (there is a TODO in permutation_montecarlo_shapley)

@Xuzzo Xuzzo added bug Something isn't working testing Writing and verifying tests (unit or otherwise) labels May 31, 2022
@mdbenito
Copy link
Collaborator

mdbenito commented Jun 1, 2022

Shouldn't it just be map_reduce(fun, u.data.indices, ...) ? Or is that usage what's broken?

@mdbenito mdbenito added the accepted This enhancement or bug report has been accepted as valid label Jun 16, 2022
@AnesBenmerzoug AnesBenmerzoug self-assigned this Jun 23, 2022
@Xuzzo
Copy link
Collaborator Author

Xuzzo commented Aug 16, 2022

In order not to copy all the data to all the workers, map reduce was splitting the dataset in many different chunks. This is a problem, since each worker was calculating the Shapley values on a different dataset, causing wrong results.
We have now switched to ray which uses Plasma under to hood to share objects with the various workers.

See #9 #22 and #113

@Xuzzo Xuzzo closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This enhancement or bug report has been accepted as valid bug Something isn't working testing Writing and verifying tests (unit or otherwise)
Projects
None yet
Development

No branches or pull requests

3 participants