Include job name in the emitted metrics (#113884)

What it says in the title
Pull Request resolved: https://github.com/pytorch/pytorch/pull/113884
Approved by: https://github.com/clee2000
This commit is contained in:
Zain Rizvi
2023-11-16 21:26:44 +00:00
committed by PyTorch MergeBot
parent 2530d47cbe
commit 9a9232956f
6 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,7 @@ RUN_NUMBER = 123
RUN_ATTEMPT = 3
PR_NUMBER = 6789
JOB_ID = 234
JOB_NAME = "some-job-name"
class TestUploadStats(unittest.TestCase):
@ -38,6 +39,7 @@ class TestUploadStats(unittest.TestCase):
"GITHUB_RUN_NUMBER": str(RUN_NUMBER),
"GITHUB_RUN_ATTEMPT": str(RUN_ATTEMPT),
"JOB_ID": str(JOB_ID),
"JOB_NAME": str(JOB_NAME),
},
clear=True, # Don't read any preset env vars
).start()
@ -70,6 +72,7 @@ class TestUploadStats(unittest.TestCase):
"some_number": 123,
"float_number": decimal.Decimal(str(32.34)),
"job_id": JOB_ID,
"job_name": JOB_NAME,
}
# Preserve the metric emitted