Skip to content

Commit 80b4e36

Browse files
committed
tune coverage
1 parent 4fec0ea commit 80b4e36

6 files changed

Lines changed: 15 additions & 5 deletions

File tree

.coveragerc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ exclude_lines =
33
pragma: no cover
44
if __name__ == .__main__.:
55
@onnxscript.*
6+
except ImportError:
7+
except ImportError as e:
8+
except Exception as e:
9+
except subprocess.TimeoutExpired as e:
10+
raise AssertionError(
11+
raise NotImplementedError(
12+
if patch_parse_processor_args:
13+
if patch_DynamicCache:
14+
def make_sliding_window_cache(
15+
def make_hybrid_cache(
616

717
[run]
818
include =

onnx_diagnostic/helpers/_log_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def apply_excel_style(
357357
CubeViewDef.HighLightKind.GREEN: Font(color="00AA00"),
358358
CubeViewDef.HighLightKind.RED: Font(color="FF0000"),
359359
}
360-
if verbose:
360+
if verbose: # pragma: no cover
361361
from tqdm import tqdm
362362

363363
sheet_names = tqdm(list(workbook.sheetnames))

onnx_diagnostic/helpers/bench_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def run_benchmark(
180180
temp_output_data is None or "temp" in temp_output_data
181181
), f"Unexpected value for {temp_output_data!r}"
182182
assert configs, f"No configuration was given (script_name={script_name!r})"
183-
if verbose:
183+
if verbose: # pragma: no cover
184184
from tqdm import tqdm
185185

186186
loop = tqdm(configs)

onnx_diagnostic/helpers/log_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def to_images(
264264

265265
@classmethod
266266
def _make_loop(cls, ensemble, verbose):
267-
if verbose:
267+
if verbose: # pragma: no cover
268268
from tqdm import tqdm
269269

270270
loop = tqdm(ensemble)

onnx_diagnostic/torch_export_patches/eval/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def evaluation(
8585

8686
sorted_cases = sorted(cases.items())
8787
loop = list(itertools.product(sorted_cases, dynamic, exporters))
88-
if verbose:
88+
if verbose: # pragma: no cover
8989
try:
9090
import tqdm
9191

onnx_diagnostic/torch_export_patches/patches/_patch_transformers_generation_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def branch_3(input_ids, cache_position):
134134
)
135135
return inputs_embeds, input_ids
136136

137-
def prepare_inputs_for_generation(
137+
def prepare_inputs_for_generation( # pragma: no cover
138138
self,
139139
input_ids: torch.LongTensor,
140140
past_key_values: Optional[Cache] = None,

0 commit comments

Comments
 (0)