mirror of
https://github.com/karpathy/nanochat.git
synced 2026-02-10 12:39:50 +00:00
Simplified file reading patterns by using Path.read_text() instead of with path.open() as f: f.read(). This makes the code more concise and Pythonic while maintaining the same functionality. Changes: - Replace path.open().read() with path.read_text() - Replace yaml.safe_load(f) with yaml.safe_load(path.read_text()) - Eliminate redundant file reads in configurator.py (read file once) - Reduce code by 10 lines overall All changes preserve existing behavior and encoding specifications. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| base_eval.py | ||
| base_loss.py | ||
| base_train.py | ||
| chat_cli.py | ||
| chat_eval.py | ||
| chat_rl.py | ||
| chat_sft.py | ||
| chat_web.py | ||
| mid_train.py | ||
| tok_eval.py | ||
| tok_train.py | ||