Skip to content

Commit

Permalink
Re-enable detectron2 model accuracy checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Jun 19, 2024
1 parent 612b3c8 commit c30d44d
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ eval_deterministic: false
eval_nograd: true
train_benchmark: false
train_deterministic: false
not_implemented:
- test: example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
3 changes: 0 additions & 3 deletions torchbenchmark/models/detectron2_maskrcnn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ class Model(BenchmarkModel):
model_file = os.path.join(MODEL_DIR, ".data", f"{MODEL_NAME}.pkl")
DEFAULT_TRAIN_BSIZE = 1
DEFAULT_EVAL_BSIZE = 1
# Skip correctness check, because the output tensor can't be verified using
# cosine similarity or torch.close()
SKIP_CORRECTNESS_CHECK = True

def __init__(self, test, device, batch_size=None, extra_args=[]):
super().__init__(
Expand Down
1 change: 0 additions & 1 deletion torchbenchmark/models/detectron2_maskrcnn/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ eval_deterministic: false
eval_nograd: true
not_implemented:
- device: cpu
- test: example
train_benchmark: false
train_deterministic: false
3 changes: 0 additions & 3 deletions torchbenchmark/models/maml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ class Model(BenchmarkModel):
DEFAULT_EVAL_BSIZE = 1
ALLOW_CUSTOMIZE_BSIZE = False
CANNOT_SET_CUSTOM_OPTIMIZER = True
# Skip correctness check, because maml runs backward and optimizer in eval()
# Which will return non-deterministic results
SKIP_CORRECTNESS_CHECK = True

def __init__(self, test, device, batch_size=None, extra_args=[]):
super().__init__(
Expand Down
4 changes: 1 addition & 3 deletions torchbenchmark/util/framework/detectron2/model_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ class Detectron2Model(BenchmarkModel):
# Default batch sizes
DEFAULT_TRAIN_BSIZE = 1
DEFAULT_EVAL_BSIZE = 1
# Skip correctness check, because the output tensor can't be verified using
# cosine similarity or torch.close()
SKIP_CORRECTNESS_CHECK = True
DISABLE_DETERMINISM = True

def __init__(self, variant, test, device, batch_size=None, extra_args=[]):
super().__init__(
Expand Down

0 comments on commit c30d44d

Please sign in to comment.