mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
https://github.com/pytorch/test-infra/pull/4617 generates `file_test_class_rating.json`. Now we ensure it's available for heuristics to use during the test step. (Actual heuristics will come in a separate PR) Pull Request resolved: https://github.com/pytorch/pytorch/pull/111229 Approved by: https://github.com/huydhn
26 lines
759 B
Python
26 lines
759 B
Python
import pathlib
|
|
import sys
|
|
|
|
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent.parent
|
|
sys.path.append(str(REPO_ROOT))
|
|
from tools.stats.import_test_stats import (
|
|
get_test_class_ratings,
|
|
get_test_file_ratings,
|
|
get_test_times,
|
|
)
|
|
|
|
TEST_TIMES_FILE = ".pytorch-test-times.json"
|
|
TEST_FILE_RATINGS_FILE = ".pytorch-test-file-ratings.json"
|
|
TEST_CLASS_RATINGS_FILE = ".pytorch-test-class-ratings.json"
|
|
|
|
|
|
def main() -> None:
|
|
print(f"Exporting test times from test-infra to {TEST_TIMES_FILE}")
|
|
get_test_times(str(REPO_ROOT), filename=TEST_TIMES_FILE)
|
|
get_test_file_ratings(str(REPO_ROOT), filename=TEST_FILE_RATINGS_FILE)
|
|
get_test_class_ratings(str(REPO_ROOT), filename=TEST_CLASS_RATINGS_FILE)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|