nanochat/scripts
Tsvika Shapira 52661e5b5c refactor: use Path convenience methods for file operations
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>
2025-12-26 12:49:38 +02:00
..
base_eval.py refactor: migrate from os.path to pathlib.Path across codebase 2025-12-26 12:49:38 +02:00
base_loss.py refactor: use Path convenience methods for file operations 2025-12-26 12:49:38 +02:00
base_train.py refactor: use Path convenience methods for file operations 2025-12-26 12:49:38 +02:00
chat_cli.py upgrading all other files to be able to use cpu/mps as well as cuda. various minor other changes ,e.g. changing max_iterations to num_iterations in sft script for consistency in naming 2025-10-20 10:15:17 -07:00
chat_eval.py fix typos 2025-11-14 11:20:25 +01:00
chat_rl.py refactor: use Path convenience methods for file operations 2025-12-26 12:49:38 +02:00
chat_sft.py refactor: use Path convenience methods for file operations 2025-12-26 12:49:38 +02:00
chat_web.py refactor: use Path convenience methods for file operations 2025-12-26 12:49:38 +02:00
mid_train.py refactor: use Path convenience methods for file operations 2025-12-26 12:49:38 +02:00
tok_eval.py initial commit 2025-10-13 06:49:24 -07:00
tok_train.py refactor: migrate from os.path to pathlib.Path across codebase 2025-12-26 12:49:38 +02:00