Skip to content

Commit

Permalink
Pass custom_eps via kwargs for flexible test tolerances
Browse files Browse the repository at this point in the history
Added support for passing `custom_eps` through `kwargs` to allow dynamic epsilon values for comparison in tests.
This improves flexibility in handling precision variations (FP32, FP16).

Following both tickets are interrelated.
https://jira.devtools.intel.com/browse/CVS-105896
https://jira.devtools.intel.com/browse/CVS-152352
  • Loading branch information
pravin25 committed Feb 4, 2025
1 parent d81455e commit 8a3ff41
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/layer_tests/tensorflow_tests/test_tf_SparseSegmentMean.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,17 @@ def create_sparse_segment_mean(self, data_type, indices_type, segment_indices_ty
[[10, 20], [7], 8],
[[10, 2, 4], [10], 4]
])
@pytest.mark.parametrize('custom_eps', [1e-3])
@pytest.mark.precommit
@pytest.mark.nightly
def test_sparse_segment_mean(self, data_type, indices_type, segment_indices_type,
shape, indices_shape, segments_num,
shape, indices_shape, segments_num, custom_eps,
ie_device, precision, ir_version, temp_dir,
use_legacy_frontend):
if ie_device == 'GPU':
pytest.skip("GPU error: to_shape was called on a dynamic shape, ticket: 152352")
kwargs = {
'custom_eps': custom_eps,
}
self._test(*self.create_sparse_segment_mean(data_type, indices_type, segment_indices_type,
shape, indices_shape, segments_num),
ie_device, precision, ir_version, temp_dir=temp_dir,
use_legacy_frontend=use_legacy_frontend)
use_legacy_frontend=use_legacy_frontend, **kwargs)

0 comments on commit 8a3ff41

Please sign in to comment.