Skip to content

Commit

Permalink
Remove --strict-compatible argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
ysiraichi committed Feb 7, 2024
1 parent f37c454 commit dedaab2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
8 changes: 1 addition & 7 deletions benchmarks/experiment_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ def generate_and_run_all_configs(self):

# Skip unsupported config.
if not self.model_loader.is_compatible(benchmark_model,
benchmark_experiment,
self._args.strict_compatible):
benchmark_experiment):
logger.warning("SKIP incompatible model and experiment configs.")
self._save_results(benchmark_experiment.to_dict(),
benchmark_model.to_dict(), {"error": "SKIP"})
Expand Down Expand Up @@ -876,11 +875,6 @@ def __str__(self):
action="store_true",
help="""If set, verifies the model output with PT Eager mode, and saves relative error to the output file."""
)
parser.add_argument(
"--strict-compatible",
action="store_true",
help="Strictly skips some models including models without installation file or causing stackdump.",
)
return parser.parse_args(args)


Expand Down
27 changes: 2 additions & 25 deletions benchmarks/torchbench_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,25 +135,6 @@
],
}

# This strict deny list denies tests that hold for too long and timeoout.
STRICT_DENY_LIST = {
**{
"opacus_cifar10": [{
"accelerator": "tpu",
},], # stackdump issue in TPU
"pytorch_stargan": [{
"accelerator": "tpu",
},], # stackdump issue in TPU
"soft_actor_critic": [{
"accelerator": "tpu",
},], # stackdump issue in TPU
"speech_transformer": [{
"accelerator": "tpu",
},], # stackdump issue in TPU
},
**DENY_LIST
}


class TorchBenchModelLoader(ModelLoader):

Expand Down Expand Up @@ -234,12 +215,8 @@ def list_model_configs(self):

return model_configs

def is_compatible(self,
dummy_benchmark_model,
benchmark_experiment,
use_strict_deny=False):
def is_compatible(self, dummy_benchmark_model, benchmark_experiment):
name = dummy_benchmark_model.model_name
deny_list = STRICT_DENY_LIST if use_strict_deny else DENY_LIST

if name in self.skip["skip"]:
return False
Expand All @@ -258,7 +235,7 @@ def is_compatible(self,
def is_attr_eq(k, v):
return getattr(benchmark_experiment, k) == v

for deny_experiment_config in deny_list.get(name, []):
for deny_experiment_config in DENY_LIST.get(name, []):
if all(is_attr_eq(k, v) for k, v in deny_experiment_config.items()):
return False

Expand Down

0 comments on commit dedaab2

Please sign in to comment.