Skip to content

Commit

Permalink
remove xfails that are passing
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech committed Oct 4, 2024
1 parent ec7c05b commit 94c6af2
Show file tree
Hide file tree
Showing 17 changed files with 125 additions and 86 deletions.
10 changes: 5 additions & 5 deletions tensorflow_data_validation/api/stats_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class StatsAPITest(absltest.TestCase):
def _get_temp_dir(self):
return tempfile.mkdtemp()

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_stats_pipeline(self):
record_batches = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -203,7 +203,7 @@ def test_stats_pipeline(self):
}
""", statistics_pb2.DatasetFeatureStatisticsList())

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_stats_pipeline_with_examples_with_no_values(self):
record_batches = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -321,7 +321,7 @@ def test_stats_pipeline_with_examples_with_no_values(self):
test_util.make_dataset_feature_stats_list_proto_equal_fn(
self, expected_result, check_histograms=False))

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_stats_pipeline_with_zero_examples(self):
expected_result = text_format.Parse(
"""
Expand All @@ -343,7 +343,7 @@ def test_stats_pipeline_with_zero_examples(self):
test_util.make_dataset_feature_stats_list_proto_equal_fn(
self, expected_result, check_histograms=False))

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_stats_pipeline_with_sample_rate(self):
record_batches = [
pa.RecordBatch.from_arrays(
Expand Down Expand Up @@ -493,7 +493,7 @@ def test_write_stats_to_tfrecord_and_binary(self):

class MergeDatasetFeatureStatisticsListTest(absltest.TestCase):

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_merges_two_shards(self):
stats1 = text_format.Parse(
"""
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_data_validation/api/validation_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3241,7 +3241,7 @@ def _assert_skew_pairs_equal(self, actual, expected) -> None:
for each in actual:
self.assertIn(each, expected)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_detect_feature_skew(self):
training_data = [
text_format.Parse("""
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_data_validation/coders/csv_decoder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
]


@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed. ")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed. ")
class CSVDecoderTest(parameterized.TestCase):
"""Tests for CSV decoder."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@
]


@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed. ")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed. ")
class SequenceExampleStatsTest(parameterized.TestCase):

@classmethod
Expand Down
24 changes: 12 additions & 12 deletions tensorflow_data_validation/skew/feature_skew_detector_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _make_ex(identifier: str,

class FeatureSkewDetectorTest(parameterized.TestCase):

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_detect_feature_skew(self):
baseline_examples, test_examples, _ = get_test_input(
include_skewed_features=True, include_close_floats=True)
Expand Down Expand Up @@ -194,7 +194,7 @@ def test_detect_feature_skew(self):
skew_result,
test_util.make_skew_result_equal_fn(self, expected_result))

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_detect_no_skew(self):
baseline_examples, test_examples, _ = get_test_input(
include_skewed_features=False, include_close_floats=False)
Expand Down Expand Up @@ -224,7 +224,7 @@ def test_detect_no_skew(self):
util.assert_that(skew_sample, make_sample_equal_fn(self, 0, []),
'CheckSkewSample')

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_obtain_skew_sample(self):
baseline_examples, test_examples, skew_pairs = get_test_input(
include_skewed_features=True, include_close_floats=False)
Expand All @@ -248,7 +248,7 @@ def test_obtain_skew_sample(self):
skew_sample, make_sample_equal_fn(self, sample_size,
potential_samples))

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_empty_inputs(self):
baseline_examples, test_examples, _ = get_test_input(
include_skewed_features=True, include_close_floats=True)
Expand Down Expand Up @@ -304,7 +304,7 @@ def test_empty_inputs(self):
make_sample_equal_fn(self, 0, expected_result),
'CheckSkewSample')

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_float_precision_configuration(self):
baseline_examples, test_examples, _ = get_test_input(
include_skewed_features=True, include_close_floats=True)
Expand Down Expand Up @@ -395,7 +395,7 @@ def test_no_identifier_features(self):
_ = ((baseline_examples, test_examples)
| feature_skew_detector.DetectFeatureSkewImpl([]))

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_duplicate_identifiers_allowed_with_duplicates(self):
base_example_1 = text_format.Parse(
"""
Expand Down Expand Up @@ -469,7 +469,7 @@ def test_duplicate_identifiers_allowed_with_duplicates(self):
skew_result,
test_util.make_skew_result_equal_fn(self, expected_result))

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_duplicate_identifiers_not_allowed_with_duplicates(self):
base_example_1 = text_format.Parse(
"""
Expand Down Expand Up @@ -535,7 +535,7 @@ def test_duplicate_identifiers_not_allowed_with_duplicates(self):
self.assertLen(actual_counter, 1)
self.assertEqual(actual_counter[0].committed, 1)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_skips_missing_identifier_example(self):
base_example_1 = text_format.Parse(
"""
Expand Down Expand Up @@ -576,7 +576,7 @@ def test_skips_missing_identifier_example(self):
runner = p.run()
runner.wait_until_finish()

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_empty_features_equivalent(self):
base_example_1 = text_format.Parse(
"""
Expand Down Expand Up @@ -626,7 +626,7 @@ def test_empty_features_equivalent(self):
runner = p.run()
runner.wait_until_finish()

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_empty_features_not_equivalent_to_missing(self):
base_example_1 = text_format.Parse(
"""
Expand Down Expand Up @@ -699,7 +699,7 @@ def test_telemetry(self):
self.assertLen(actual_counter, 1)
self.assertEqual(actual_counter[0].committed, 1)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_confusion_analysis(self):

baseline_examples = [
Expand Down Expand Up @@ -834,7 +834,7 @@ def test_confusion_analysis_errors(self, input_example, expected_error_regex):
feature_skew_detector.ConfusionConfig(name='val'),
]))[feature_skew_detector.CONFUSION_KEY]

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_match_stats(self):
baseline_examples = [
_make_ex('id0'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def test_lift_with_no_schema_or_x_path(self):
lift_stats_generator.LiftStatsGenerator(
schema=None, y_path=types.FeaturePath(['int_y']))

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_string_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -454,7 +454,7 @@ def test_lift_string_y(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_bytes_x_and_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -530,7 +530,7 @@ def test_lift_bytes_x_and_y(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_int_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -697,7 +697,7 @@ def metrics_verify_fn(metric_results):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_bool_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -806,7 +806,7 @@ def test_lift_bool_y(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_float_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -952,7 +952,7 @@ def test_lift_float_y(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_weighted(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def test_lift_weighted_weight_is_none(self):
with beam.Pipeline() as p:
_ = p | beam.Create(examples) | generator.ptransform

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_no_categorical_features(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1285,7 +1285,7 @@ def test_lift_no_categorical_features(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_x_is_none(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1361,7 +1361,7 @@ def test_lift_x_is_none(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_y_is_none(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1444,7 +1444,7 @@ def test_lift_y_is_none(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_null_x(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1473,7 +1473,7 @@ def test_lift_null_x(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed. ")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed. ")
def test_lift_null_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1502,7 +1502,7 @@ def test_lift_null_y(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_missing_x_and_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1532,7 +1532,7 @@ def test_lift_missing_x_and_y(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_float_y_is_nan(self):
# after calling bin_array, this is effectively an empty array.
examples = [
Expand Down Expand Up @@ -1562,7 +1562,7 @@ def test_lift_float_y_is_nan(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_min_x_count(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1628,7 +1628,7 @@ def test_lift_min_x_count(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_min_x_count_filters_all(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1659,7 +1659,7 @@ def test_lift_min_x_count_filters_all(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_overlapping_top_bottom_k(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1750,7 +1750,7 @@ def test_lift_overlapping_top_bottom_k(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_flattened_x(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1854,7 +1854,7 @@ def test_lift_flattened_x(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_flattened_x_leaf(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -1930,7 +1930,7 @@ def test_lift_flattened_x_leaf(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_multi_x(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -2056,7 +2056,7 @@ def test_lift_multi_x(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_provided_x_no_schema(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -2123,7 +2123,7 @@ def test_lift_provided_x_no_schema(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed. ")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed. ")
def test_lift_flattened_x_and_y(self):
examples = [
pa.RecordBatch.from_arrays([
Expand Down Expand Up @@ -2242,7 +2242,7 @@ def test_lift_flattened_x_and_y(self):
add_default_slice_key_to_input=True,
add_default_slice_key_to_output=True)

@pytest.mark.xfail(run=False, reason="PR 260 This test fails and needs to be fixed.")
@pytest.mark.xfail(run=True, reason="PR 260 This test fails and needs to be fixed.")
def test_lift_slice_aware(self):
examples = [
('slice1', pa.RecordBatch.from_arrays([
Expand Down
Loading

0 comments on commit 94c6af2

Please sign in to comment.