Skip to content

Commit 88bdd63

Browse files
committed
Merge local changes
1 parent a9a340a commit 88bdd63

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

tools/analytics/analyze_runner_usage.py

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
"pytorch/cppdocs",
9292
"pytorch/pytorch.github.io",
9393
"pytorch/examples",
94+
# archived but not marked as such in github repo settings
95+
"pytorch/serve",
9496
# proposed
9597
"pytorch/builder",
9698
"pytorch/xla",
@@ -101,26 +103,40 @@
101103
# List of runner labels to exclude from "runners not in scale-config" analysis
102104
# These are typically GitHub-hosted runners or other known external runners
103105
GITHUB_RUNNER_LABELS = [
104-
"linux.24_04.4x",
105-
"linux.24_04.16x",
106106
"ubuntu-latest",
107107
"ubuntu-22.04",
108108
"ubuntu-24.04",
109109
"ubuntu-20.04",
110110
"ubuntu-18.04",
111111
"windows-latest",
112112
"windows-2022",
113-
"windows-11-arm64",
114113
"macos-latest",
115114
"macos-14",
115+
"macos-14-xlarge",
116116
"macos-13",
117117
"macos-12",
118-
"macos-14-xlarge",
118+
# Offered at Meta enterprise level
119+
"8-core-ubuntu",
120+
"4-core-ubuntu",
121+
"windows-8-core",
122+
"4-core-ubuntu-gpu-t4",
123+
"4-core-windows-gpu-t4",
124+
"32-core-ubuntu",
125+
"16-core-ubuntu",
126+
"2-core-ubuntu-arm",
127+
"4-core-ubuntu-arm",
128+
"8-core-ubuntu-22.04",
129+
"4-core-ubuntu-24.04",
130+
# needs special access
131+
"linux.24_04.4x",
132+
"linux.24_04.16x",
133+
"windows-11-arm64",
119134
# Add more runner labels to exclude here as needed
120135
]
121136

122137
USELESS_RUNNER_LABELS = [
123-
"self-hosted", # really, a useless label we want to ignoreß
138+
"self-hosted", # really, a useless label we want to ignore
139+
"linux.g5.4xlarge.nvidia.cpu", # a nonexistent label used by a repo
124140
]
125141

126142
HEADERS = {
@@ -681,6 +697,20 @@ def main():
681697
if repos_by_github_runner:
682698
output_data["repos_by_github_runner"] = dict(repos_by_github_runner)
683699

700+
# --- SORT OUTPUT ALPHABETICALLY FOR CONSISTENCY (except top-level keys) ---
701+
def deep_sort(obj, sort_keys=True):
702+
if isinstance(obj, dict):
703+
keys = sorted(obj) if sort_keys else obj.keys()
704+
return {k: deep_sort(obj[k]) for k in keys}
705+
elif isinstance(obj, list):
706+
# If list of dicts with 'repo' key, sort by 'repo', else sort normally
707+
if obj and isinstance(obj[0], dict) and 'repo' in obj[0]:
708+
return sorted([deep_sort(x) for x in obj], key=lambda x: x['repo'])
709+
return sorted(deep_sort(x) for x in obj)
710+
else:
711+
return obj
712+
713+
output_data = deep_sort(output_data, sort_keys=False)
684714
save_to_yaml(output_data)
685715

686716
# Show final cache stats

0 commit comments

Comments
 (0)