TRAIS-Lab / dattri

`dattri` is a PyTorch library for developing, benchmarking, and deploying efficient data attribution algorithms.
https://trais-lab.github.io/dattri/
MIT License
30 stars 9 forks source link

Improve docstring in dattri.func and dattri.metrics #127

Closed jiaqima closed 2 months ago

jiaqima commented 2 months ago

Description

This PR mainly improves the docstring of files under dattri.func and dattri.metrics.

1. Motivation and Context

There are some format inconsistency issues and typos in the docstrings.

2. Summary of the change

3. What tests have been added/updated for the change?

jiaqima commented 2 months ago

@TheaperDeng what will be affected if we change calculate_loo_groundtruth in ground_truth.py to calculate_loo_ground_truth? Its name format is now inconsistent with calculate_lds_ground_truth.

TheaperDeng commented 2 months ago

@TheaperDeng what will be affected if we change calculate_loo_groundtruth in ground_truth.py to calculate_loo_ground_truth? Its name format is now inconsistent with calculate_lds_ground_truth.

I think the only thing is to search this function in all the calls in code and documentation and change it throughout the repo. There might be several place be affected, mostly in benchmark and model_utils folders

jiaqima commented 2 months ago

@TheaperDeng what will be affected if we change calculate_loo_groundtruth in ground_truth.py to calculate_loo_ground_truth? Its name format is now inconsistent with calculate_lds_ground_truth.

I think the only thing is to search this function in all the calls in code and documentation and change it throughout the repo. There might be several place be affected, mostly in benchmark and model_utils folders

The only two files are dattri/metrics/ground_truth.py and docs/source/api/benchmark.rst.

jiaqima commented 2 months ago

Merging this PR to avoid it getting conflicts with other PRs, as this involves multiple files.