Skip to content

Commit

Permalink
[tuner] reduce log size
Browse files Browse the repository at this point in the history
Signed-off-by: Bangtian Liu <[email protected]>
  • Loading branch information
bangtianliu committed Jan 10, 2025
1 parent b920696 commit 3d17d05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions tuner/tuner/candidate_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,6 @@ def run_command(run_pack: RunPack) -> RunResult:
text=True,
timeout=timeout_seconds,
)

if result.stdout:
logging.debug(f"stdout: {result.stdout}")
if result.stderr:
logging.debug(f"stderr: {result.stderr}")
except subprocess.TimeoutExpired as e:
logging.warning(
f"Command '{command_str}' timed out after {timeout_seconds} seconds."
Expand Down
4 changes: 2 additions & 2 deletions tuner/tuner/libtuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def compile(
compiled_candidates = [c for c in compiled_candidates if c is not None]
success_rate = float(len(compiled_candidates)) / float(len(candidates))
logging.info(
f"Successfully compiled [{len(compiled_candidates)}] candidates. Success rate: {success_rate}"
f"Successfully compiled [{len(compiled_candidates)}] candidates. Success rate: {success_rate:.2f}"
)

# Remove duplicate vmfbs from the candidate list.
Expand Down Expand Up @@ -875,7 +875,7 @@ def get_speedup(result: BenchmarkResult) -> float:
speedup = f"{round(get_speedup(r) * 100, 2)}% of baseline"
else:
speedup = "baseline unavailable"
logging.info(f"Candidate {r.candidate_id} time: {r.time} ({speedup})")
logging.info(f"Candidate {r.candidate_id} time: {r.time:.2f} ({speedup})")
return best_results


Expand Down

0 comments on commit 3d17d05

Please sign in to comment.