Closed jiaqima closed 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 what will be affected if we change
calculate_loo_groundtruth
inground_truth.py
tocalculate_loo_ground_truth
? Its name format is now inconsistent withcalculate_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
@TheaperDeng what will be affected if we change
calculate_loo_groundtruth
inground_truth.py
tocalculate_loo_ground_truth
? Its name format is now inconsistent withcalculate_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
andmodel_utils
folders
The only two files are dattri/metrics/ground_truth.py
and docs/source/api/benchmark.rst
.
Merging this PR to avoid it getting conflicts with other PRs, as this involves multiple files.
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
dattri/func/utils.py
, changed alltorch.Tensor
toTensor
since it is importeddattri/task.py
:_genearte_param_layer_map
->_generate_param_layer_map
calculate_loo_groundtruth
indattri/metrics/ground_truth.py
tocalculate_loo_ground_truth
. Also changed all the references to this function.3. What tests have been added/updated for the change?
torch.Tensor
toTensor
. The only code change is a membership function name intask.py
and a util function inground_truth.py
, which should be fine.