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
28 stars 8 forks source link

dattri.metrics.metrics is a bit redundant #29

Closed jiaqima closed 19 hours ago

jiaqima commented 4 months ago

Currently, we have our evaluation metrics included in dattri/metrics/metrics.py, which leads to the API dattri.metrics.metrics.xxx. This is a bit redundant. We may want to remove one 'metrics' in this path.

TheaperDeng commented 4 months ago

we can add

import .metrics import *

In dattri/metrics/__init__.py

jiaqima commented 4 months ago

How about having one file named _retrain.py with loo and lds in it. Then have another file named _downstream.py for mislabel detection. Finally import these metrics in __init__.py. This will make it similar to the sklearn metrics: https://github.com/scikit-learn/scikit-learn/tree/8721245511de2f225ff5f9aa5f5fadce663cd4a3/sklearn/metrics

EDIT: or maybe just retrain.py and downstream.py