File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class FullSuiteError(RuntimeError):
5959class _RejectRedirects (urllib .request .HTTPRedirectHandler ):
6060 def redirect_request (self , * args : Any , ** kwargs : Any ) -> None : # noqa: ARG002
6161 """Refuse every redirect by returning None."""
62- return None # noqa: RET501
62+ return
6363
6464
6565_NO_REDIRECT_OPENER = urllib .request .build_opener (_RejectRedirects ())
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def redirect_request(
5454 newurl : str , # noqa: ARG002
5555 ) -> None :
5656 """Refuse every redirect by returning None."""
57- return None # noqa: RET501
57+ return
5858
5959
6060def reject_nonfinite (value : str ) -> Never : # noqa: ARG001
Original file line number Diff line number Diff line change 1414 python collect_sweep_results.py <artifacts_dir> <output_dir>
1515"""
1616
17+ import contextlib
1718import json
1819import sys
1920from pathlib import Path
@@ -150,12 +151,8 @@ def load_experiment(exp_dir: Path) -> dict | None:
150151 metadata_file = exp_dir / "benchmark_metadata.json"
151152 total_time_sec = None
152153 if metadata_file .exists ():
153- try :
154- with open (metadata_file ) as f :
155- metadata = json .load (f )
156- total_time_sec = metadata .get ("benchmark_runtime_sec" )
157- except Exception : # noqa: BLE001, S110
158- pass
154+ with contextlib .suppress (Exception ), open (metadata_file ) as f :
155+ total_time_sec = json .load (f ).get ("benchmark_runtime_sec" )
159156
160157 if not total_time_sec or total_time_sec <= 0 :
161158 first_start_ms = df ["start_time_ms" ].min ()
Original file line number Diff line number Diff line change 1+ import contextlib
12import json
23import sys
34from pathlib import Path
@@ -59,14 +60,12 @@ def find_eval_sets(root: Path) -> list[Path]:
5960 extracted flat into root (no subdirectory), so check root itself too.
6061 """
6162 out : list [Path ] = []
62- try :
63+ with contextlib . suppress ( Exception ) :
6364 if (root / "meta_env.json" ).exists ():
6465 out .append (root )
6566 out .extend (
6667 d for d in sorted (root .iterdir ()) if d .is_dir () and (d / "meta_env.json" ).exists ()
6768 )
68- except Exception : # noqa: BLE001, S110
69- pass
7069 return out
7170
7271
Original file line number Diff line number Diff line change 3434
3535from infx .config import git_repository_root , project_root
3636
37+ from .prepare_perf_changelog_merge import (
38+ canonicalize_appended_links ,
39+ resolve_conflict_bytes ,
40+ )
41+ from .sweep_runs import (
42+ artifact_names ,
43+ completed_pr_runs ,
44+ has_reusable_result_artifacts ,
45+ pr_commit_shas ,
46+ )
47+ from .validate_perf_changelog import read_git_file
48+
3749try :
3850 import git as gitpython
3951 import requests
@@ -70,17 +82,6 @@ class RateLimitExceededException(GithubException): # type: ignore[no-redef]
7082 from github .PullRequest import PullRequest
7183 from github .Repository import Repository
7284
73- from .prepare_perf_changelog_merge import ( # noqa: E402
74- canonicalize_appended_links ,
75- resolve_conflict_bytes ,
76- )
77- from .sweep_runs import ( # noqa: E402
78- artifact_names ,
79- completed_pr_runs ,
80- has_reusable_result_artifacts ,
81- pr_commit_shas ,
82- )
83- from .validate_perf_changelog import read_git_file # noqa: E402
8485
8586DEFAULT_REPO = "SemiAnalysisAI/InferenceX"
8687DEFAULT_CHECK_TIMEOUT = 900
You can’t perform that action at this time.
0 commit comments