hest.bench.benchmark
- hest.bench.benchmark(encoder: Module | None, enc_transf: Callable | None, precision: dtype | None, cli_args: dict = None, **kwargs) Tuple[list, dict]
Benchmark a patch encoder on HEST-bench
- Parameters:
encoder (torch.nn.Module) – patch encoder to benchmark. Can be: - a plain torch module (requires enc_transf and precision), or - a TRIDENT-style encoder object exposing eval_transforms and precision.
enc_transf (Callable) – transformation applied to encoder during inference (only required when encoder is a plain torch module).
precision (torch.dtype) – precision used by torch.amp.autocast(‘cuda’) during inference (only required when encoder is a plain torch module).
cli_args (dict) – cli_arguments. Defaults to None.
**kwargs – lookup BenchmarkConfig for additional parameters