Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,18 @@ def from_request(
requests.exceptions.RequestException if network/timeout/HTTP error
RuntimeError if the API returns an "error" field or malformed data
"""
resp = requests.post(url, json=query, timeout=timeout)

headers = {
# Looks like a real browser instead of python-requests
"User-Agent": (
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/120.0.0.0 Safari/537.36"
),
"Accept": "application/json,text/html;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.9",
}
resp = requests.post(url, json=query, timeout=timeout, headers=headers)
resp.raise_for_status()
payload = resp.json()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
hud_info={
"url": "https://hud.pytorch.org/benchmark/v3/dashboard/torchao_micro_api_benchmark",
},
# set baseline from past 3-6 days, and compare with the lastest 4 day
# set baseline from past 3-6 days, and compare with the lastest 3 days
policy=Policy(
frequency=Frequency(value=1, unit="days"),
range=RangeConfig(
Expand Down Expand Up @@ -141,6 +141,7 @@
"branches": ["main"],
"repo": "pytorch/pytorch",
"device": "",
"arch": "",
"benchmarkName": "PyTorch operator microbenchmark",
"startTime": "{{ startTime }}",
"stopTime": "{{ stopTime }}"
Expand All @@ -152,7 +153,7 @@
hud_info={
"url": "https://hud.pytorch.org/benchmark/v3/dashboard/pytorch_operator_microbenchmark",
},
# set baseline from past 3-6 days, and compare with the lastest 4 day
# set baseline from past 3-6 days, and compare with the lastest 3 day
policy=Policy(
frequency=Frequency(value=1, unit="days"),
range=RangeConfig(
Expand Down