Skip to content

Commit

Permalink
Add broad xfail for jax_image_classifier tests :(
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed Dec 4, 2024
1 parent dfad9d5 commit 9dd270a
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions project/algorithms/jax_image_classifier_test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
from pathlib import Path
from typing import Any

import flax
import flax.linen
import pytest
from tensor_regression import TensorRegressionFixture

from project.algorithms.jax_image_classifier import JaxImageClassifier
from project.algorithms.testsuites.lightning_module_tests import GetStuffFromFirstTrainingStep
from project.conftest import fails_on_macOS_in_CI
from project.datamodules.image_classification.image_classification import (
ImageClassificationDataModule,
Expand All @@ -17,6 +14,10 @@
from .testsuites.lightning_module_tests import LightningModuleTests


@pytest.mark.xfail(
IN_SELF_HOSTED_GITHUB_CI,
reason="TODO: Test appears to be flaky only when run on the self-hosted runner?.",
)
@fails_on_macOS_in_CI
@run_for_all_configs_of_type("algorithm", JaxImageClassifier)
@run_for_all_configs_of_type("algorithm/network", flax.linen.Module)
Expand All @@ -29,22 +30,6 @@ class TestJaxImageClassifier(LightningModuleTests[JaxImageClassifier]):
`flax.linen.Module`.
"""

@pytest.mark.xfail(
IN_SELF_HOSTED_GITHUB_CI,
reason="TODO: Test appears to be flaky only when run on the self-hosted runner?.",
)
def test_initialization_is_reproducible(
self,
training_step_content: tuple[
JaxImageClassifier, GetStuffFromFirstTrainingStep, list[Any], list[Any]
],
tensor_regression: TensorRegressionFixture,
accelerator: str,
):
return super().test_initialization_is_reproducible(
training_step_content, tensor_regression, accelerator
)


@pytest.mark.slow
def test_demo(tmp_path: Path):
Expand Down

0 comments on commit 9dd270a

Please sign in to comment.