Skip to content

Commit 0511568

Browse files
committed
polishing
1 parent ea320d3 commit 0511568

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

tests/post_training/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,11 @@ To mark a test as expected to fail (xfail) when a number of compression operatio
160160
...
161161
num_compressed_xfail_reason: "Issue-<jira ticket number>"
162162
```
163+
164+
To mark a test as expected to fail (xfail) during the compression process with an exception:
165+
166+
```yml
167+
<Name from model scopes>_backend_<BACKEND>:
168+
...
169+
exception_xfail_reason: "Issue-<jira ticket number>"
170+
```

tests/post_training/experimental/sparsify_activations/pipelines.py

-4
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ def _compress(self):
8383
)
8484

8585
def get_num_compressed(self) -> None:
86-
"""
87-
88-
Get number of the FakeQuantize nodes in the compressed IR.
89-
"""
9086
super().get_num_compressed()
9187
ie = ov.Core()
9288
model = ie.read_model(model=self.path_compressed_ir)

tests/post_training/pipelines/base.py

-5
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,6 @@ def save_compressed_model(self) -> None:
422422
ov.serialize(self.compressed_model, str(self.path_compressed_ir))
423423

424424
def get_num_compressed(self) -> None:
425-
"""
426-
427-
Get number of the FakeQuantize nodes in the compressed IR.
428-
"""
429-
430425
ie = ov.Core()
431426
model = ie.read_model(model=self.path_compressed_ir)
432427

tests/post_training/pipelines/lm_weight_compression.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ def save_compressed_model(self) -> None:
223223
)
224224

225225
def run_bench(self) -> None:
226-
# Does not apply to LMWeightCompression
227-
return
226+
pass
228227

229228
def _dump_model_fp32(self) -> None:
230229
"""

tests/post_training/test_quantize_conformance.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,13 @@ def create_pipeline_kwargs(test_model_param, subset_size, test_case_name, refere
284284

285285

286286
def _update_status(pipeline: BaseTestPipeline, errors: List[ErrorReason]) -> List[str]:
287-
""" """
287+
"""
288+
Updates status of the pipeline based on the errors encountered during the run.
289+
290+
:param pipeline: The pipeline object containing run information.
291+
:param errors: List of errors encountered during the run.
292+
:return: List of unexpected errors.
293+
"""
288294
pipeline.run_info.status = "" # Successful status
289295
xfails, unexpected_errors = [], []
290296
for report in errors:
@@ -304,6 +310,13 @@ def _collect_errors(
304310
pipeline: BaseTestPipeline,
305311
exception_report: Optional[ErrorReport] = None,
306312
) -> List[ErrorReport]:
313+
"""
314+
Collects errors based on the pipeline's run information and exception happened during the run.
315+
316+
:param pipeline: The pipeline object containing run information.
317+
:param exception_report: Optional exception report.
318+
:return: List of error reports.
319+
"""
307320
errors = []
308321

309322
if exception_report:

0 commit comments

Comments
 (0)