This PR implemented lds and calculate_lds_ground_truth.
1. Motivation and Context
Implement lds and calculate_lds_ground_truth for the LDS metric calculation. This PR together with #48 is based on #21. PR #21 got a bit too messy to comment and edit.
This PR and #48 will close issue #9.
2. Summary of the change
Implemented calculate_lds_ground_truth in dattri/metrics/ground_truth.py
A major difference between this implementation and #21 is that we directly extract relevant numbers from metadata.yml instead of inferring from the retrained model directory, which is prune to errors especially when there is missing checkpoints.
A minor note: this PR renamed the file groundtruth.py to ground_truth.py
Implemented lds in dattri/metrics/metrics.py
Added unit test in test/dattri/metrics/test_lds.py
3. What tests have been added/updated for the change?
[x] Unit test: Typically, this should be included if you implemented a new function/fixed a bug.
Description
This PR implemented
lds
andcalculate_lds_ground_truth
.1. Motivation and Context
Implement
lds
andcalculate_lds_ground_truth
for the LDS metric calculation. This PR together with #48 is based on #21. PR #21 got a bit too messy to comment and edit.This PR and #48 will close issue #9.
2. Summary of the change
calculate_lds_ground_truth
indattri/metrics/ground_truth.py
groundtruth.py
toground_truth.py
lds
indattri/metrics/metrics.py
test/dattri/metrics/test_lds.py
3. What tests have been added/updated for the change?