mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[TD] More files for test_public_bindings (#132284)
It relies on that file Also we care about .cpp files too apparently Pull Request resolved: https://github.com/pytorch/pytorch/pull/132284 Approved by: https://github.com/ZainRizvi
This commit is contained in:
committed by
PyTorch MergeBot
parent
cb4c107d70
commit
aeb78c9849
@ -15,6 +15,7 @@ class PublicBindings(HeuristicInterface):
|
||||
# Literally just a heuristic for test_public_bindings. Pretty much anything
|
||||
# that changes the public API can affect this testp
|
||||
test_public_bindings = "test_public_bindings"
|
||||
additional_files = ["test/allowlist_for_publicAPI.json"]
|
||||
|
||||
def __init__(self, **kwargs: dict[str, Any]) -> None:
|
||||
super().__init__(**kwargs)
|
||||
@ -28,7 +29,8 @@ class PublicBindings(HeuristicInterface):
|
||||
changed_files = []
|
||||
|
||||
if any(
|
||||
file.startswith("torch/") and file.endswith(".py") for file in changed_files
|
||||
file.startswith("torch/") or file in self.additional_files
|
||||
for file in changed_files
|
||||
):
|
||||
test_ratings[TestRun(self.test_public_bindings)] = 1.0
|
||||
return TestPrioritizations(tests, test_ratings)
|
||||
|
Reference in New Issue
Block a user