[ci][ez] Add job_id to emit_metrics (#113099)

As in title.

Also print the job id in the step since I'm struggling to find it
Pull Request resolved: https://github.com/pytorch/pytorch/pull/113099
Approved by: https://github.com/seemethere
This commit is contained in:
Catherine Lee
2023-11-08 10:32:37 +00:00
committed by PyTorch MergeBot
parent 3914566c73
commit 6e73ae2022
8 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,7 @@ RUN_ID = 56
RUN_NUMBER = 123
RUN_ATTEMPT = 3
PR_NUMBER = 6789
JOB_ID = 234
class TestUploadStats(unittest.TestCase):
@ -36,6 +37,7 @@ class TestUploadStats(unittest.TestCase):
"GITHUB_RUN_ID": str(RUN_ID),
"GITHUB_RUN_NUMBER": str(RUN_NUMBER),
"GITHUB_RUN_ATTEMPT": str(RUN_ATTEMPT),
"JOB_ID": str(JOB_ID),
},
clear=True, # Don't read any preset env vars
).start()
@ -67,6 +69,7 @@ class TestUploadStats(unittest.TestCase):
"run_attempt": RUN_ATTEMPT,
"some_number": 123,
"float_number": decimal.Decimal(str(32.34)),
"job_id": JOB_ID,
}
# Preserve the metric emitted