diff --git a/Makefile b/Makefile index 811e22d9..713e3771 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,22 @@ -.PHONY: test checkstyle test-convergence all serve build clean +.PHONY: test test-verbose checkstyle test-convergence all serve build clean all: checkstyle test test-convergence # Command to run pytest for correctness tests test: + python -m pytest --disable-warnings \ + --ignore=test/convergence \ + test/ + +# Command to run pytest for correctness tests with coverage reporting and full test-duration breakdown +test-verbose: python -m pytest --disable-warnings \ --cov=src/liger_kernel \ --cov-report=term-missing \ + --cov-report=html \ + --cov-config=pyproject.toml \ + --durations=0 \ --ignore=test/convergence \ test/ diff --git a/pyproject.toml b/pyproject.toml index 843eb063..b6cd0595 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,13 +24,6 @@ pythonpath = ["src", "."] asyncio_mode = "auto" log_cli = true log_cli_level = "INFO" -addopts = [ - "--cov=src/liger_kernel", - "--cov-report=term-missing", - "--cov-report=html", - "--cov-config=pyproject.toml", - "--durations=0" -] python_files = "test_*.py" testpaths = ["test/"] diff --git a/test/transformers/test_poly_norm.py b/test/transformers/test_poly_norm.py index 3101b8f6..d9d0ecfc 100644 --- a/test/transformers/test_poly_norm.py +++ b/test/transformers/test_poly_norm.py @@ -99,7 +99,7 @@ class NaivePolyNorm(nn.Module): (torch.float32, 3e-4, 1e-6), pytest.param( torch.bfloat16, - 1.0, + 6e-1, 5e-2, marks=pytest.mark.skipif(not supports_bfloat16(), reason="bfloat16 not supported on this GPU"), ),