Files
pytorch/tools/testing/target_determination/gen_artifact.py
PyTorch MergeBot 99f2491af9 Revert "Use absolute path path.resolve() -> path.absolute() (#129409)"
This reverts commit 45411d1fc9a2b6d2f891b6ab0ae16409719e09fc.

Reverted https://github.com/pytorch/pytorch/pull/129409 on behalf of https://github.com/jeanschmidt due to Breaking internal CI, @albanD please help get this PR merged ([comment](https://github.com/pytorch/pytorch/pull/129409#issuecomment-2571316444))
2025-01-04 14:17:20 +00:00

16 lines
431 B
Python

from __future__ import annotations
import json
import os
from pathlib import Path
from typing import Any
REPO_ROOT = Path(__file__).resolve().parents[3]
def gen_ci_artifact(included: list[Any], excluded: list[Any]) -> None:
file_name = f"td_exclusions-{os.urandom(10).hex()}.json"
with open(REPO_ROOT / "test" / "test-reports" / file_name, "w") as f:
json.dump({"included": included, "excluded": excluded}, f)