Skip to content

Commit

Permalink
Add profile option
Browse files Browse the repository at this point in the history
  • Loading branch information
pomonam committed Jun 25, 2024
1 parent 5cd802d commit d742bb4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
21 changes: 18 additions & 3 deletions examples/cifar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,30 @@ This will train the model using the specified hyperparameters and save the train

## Computing Pairwise Influence Scores

To obtain pairwise influence scores on 2000 query data points using `ekfac`, run the following command:
To compute pairwise influence scores on 2000 query data points using the `ekfac` factorization strategy, run the following command:

```bash
python analyze.py --query_batch_size 1000 \
--dataset_dir ./data \
--checkpoint_dir ./checkpoints \
--factor_strategy ekfac
```
You can also use `identity`, `diagonal`, and `kfac`. On A100 (80GB), it takes roughly 1.5 minutes to compute the
pairwise scores (including computing EKFAC factors).

In addition to `ekfac`, you can also use `identity`, `diagonal`, and `kfac` as the `factor_strategy`. On an A100 (80GB) GPU, it takes roughly 2 minutes to compute the pairwise scores (including computing the EKFAC factors):

```
```

To use AMP when computing influence scores (in addition to half precision when computing influence factors and scores), run:

```bash
python analyze.py --query_batch_size 1000 \
--dataset_dir ./data \
--checkpoint_dir ./checkpoints \
--factor_strategy ekfac \
--use_half_precision
```

## Mislabeled Data Detection

Expand Down
1 change: 1 addition & 0 deletions examples/cifar/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def main():
analysis_name="cifar10",
model=model,
task=task,
profile=args.profile,
)
# Configure parameters for DataLoader.
dataloader_kwargs = DataLoaderKwargs(num_workers=4)
Expand Down

0 comments on commit d742bb4

Please sign in to comment.