Skip to content

fixing pytest skip for only test_floatx.py #1251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

HDCharles
Copy link
Contributor

Summary: trying to fix fbcode CI, pytest skip is acting flaky

Test Plan: see CI

Reviewers:

Subscribers:

Tasks:

Tags:

Summary: trying to fix fbcode CI

Test Plan: see CI

Reviewers:

Subscribers:

Tasks:

Tags:
Copy link

pytorch-bot bot commented Nov 8, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1251

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 2 Unrelated Failures

As of commit 0433d7a with merge base e41ca4e (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@HDCharles HDCharles requested a review from jainapurva November 8, 2024 20:14
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 8, 2024
@facebook-github-bot
Copy link
Contributor

@HDCharles has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@HDCharles HDCharles requested a review from jerryzh168 November 8, 2024 20:43
@HDCharles HDCharles merged commit 242f181 into main Nov 8, 2024
15 of 19 checks passed
@msaroufim
Copy link
Member

should we remove pytest from the whole codebase? i still see it in loads of places

base) ➜  ao git:(main) grep -r "pytest.skip" .
./test/float8/test_fsdp2/test_fsdp2.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/float8/test_fsdp2/test_fsdp2.py:    pytest.skip("Unsupported CUDA device capability version", allow_module_level=True)
./test/float8/test_fsdp2/test_fsdp2_fp8_comm_only.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/float8/test_fsdp2/test_fsdp2_fp8_comm_only.py:    pytest.skip("Unsupported CUDA device capability version", allow_module_level=True)
./test/float8/test_fsdp.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/float8/test_numerics_integration.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/float8/test_compile.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/float8/test_base.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/float8/test_base.py:            pytest.skip()
./test/float8/test_fsdp_compile.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/float8/test_dtensor.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/dora/test_dora_fusion.py:    pytest.skip("requires Python >= 3.11", allow_module_level=True)
./test/dora/test_dora_fusion.py:        pytest.skip("Either store_acc or epilogue_norm must be True")
./test/dora/test_dora_layer.py:    pytest.skip("requires Python >= 3.11", allow_module_level=True)
./test/prototype/test_autoround.py:    pytest.skip("AutoRound is not available", allow_module_level=True)
./test/prototype/mx_formats/test_mx_linear.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/prototype/mx_formats/test_mx_linear.py:            pytest.skip("CUDA capability >= 8.9 required for float8 in triton")
./test/prototype/mx_formats/test_mx_linear.py:            pytest.skip("CUDA capability >= 8.9 required for float8 in triton")
./test/prototype/mx_formats/test_mx_tensor.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/prototype/mx_formats/test_mx_tensor.py:            pytest.skip("unsupported configuration")
./test/prototype/mx_formats/test_mx_tensor.py:        pytest.skip("unsupported configuration")
./test/prototype/mx_formats/test_mx_tensor.py:            pytest.skip("CUDA capability >= 8.9 required for float8 in triton")
./test/prototype/test_low_bit_optim.py:                pytest.skip("FP8 CUDA requires PyTorch >= 2.4")
./test/prototype/test_low_bit_optim.py:                pytest.skip("FP8 CUDA requires compute capability >= 8.9")
./test/prototype/test_quantized_training.py:    pytest.skip("Requires torch>=2.4", allow_module_level=True)
./test/prototype/test_awq.py:        pytest.skip("uint4 not supported on cpu")
./test/dtypes/test_bitnet.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/dtypes/test_affine_quantized_float.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/dtypes/test_uint2.py:    pytest.skip("Unsupported PyTorch version", allow_module_level=True)
./test/quantization/test_galore_quant.py:    pytest.skip("triton is not installed", allow_module_level=True)
./test/test_ops.py:    pytest.skip("Skipping the test in fbcode since we don't have TARGET file for kernels")
./test/test_ops.py:    pytest.skip("torchao.ops not available")
./test/kernel/test_fused_kernels.py:    pytest.skip("triton is not installed", allow_module_level=True)
./test/kernel/test_galore_downproj.py:    pytest.skip("triton is not installed", allow_module_level=True)
(base) ➜  ao git:(main) 

@HDCharles
Copy link
Contributor Author

HDCharles commented Nov 8, 2024

@msaroufim I spent multiple hours yesterday trying to get rid of as much of it as i can. my first attempts were more ambitious i.e.
#1245
#1243

but I basically ran into annoying to bypass issues and pared back my goal until it was just this single file to fix fbcode CI.
to actually get rid of all pytest.skip i think we'd need to get rid of pytest as the test runner which basically means getting rid of everything. pytest skip, pytest parametrize, pytest fixture....etc.

its definitely doable but probably not between the hours of 1-3am, at least not by me.
I tried getting chatgpt to do it for me but the best way to do it would be mostly using torch.testing._internal.common_utils for the test runner and parametrize and the solutions they recommended didn't actually work.

jainapurva pushed a commit that referenced this pull request Nov 11, 2024
Summary: trying to fix fbcode CI

Test Plan: see CI

Reviewers:

Subscribers:

Tasks:

Tags:
jainapurva pushed a commit that referenced this pull request Nov 12, 2024
Summary: trying to fix fbcode CI

Test Plan: see CI

Reviewers:

Subscribers:

Tasks:

Tags:
sunjiweiswift pushed a commit to sunjiweiswift/ao that referenced this pull request Nov 25, 2024
Summary: trying to fix fbcode CI

Test Plan: see CI

Reviewers:

Subscribers:

Tasks:

Tags:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants