mirror of
https://github.com/karpathy/nanochat.git
synced 2026-01-30 04:22:02 +00:00
simplify redundant if/elif in bloat metrics
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -173,10 +173,7 @@ Generated: {timestamp}
|
||||
if wc_output:
|
||||
total_line = wc_output.strip().split('\n')[-1]
|
||||
parts = total_line.split()
|
||||
if 'total' in parts:
|
||||
num_lines = int(parts[0])
|
||||
num_chars = int(parts[1])
|
||||
elif len(parts) >= 2:
|
||||
if len(parts) >= 2:
|
||||
num_lines = int(parts[0])
|
||||
num_chars = int(parts[1])
|
||||
num_tokens = num_chars // 4 # assume approximately 4 chars per token
|
||||
|
||||
Reference in New Issue
Block a user