davanstrien HF Staff Claude Opus 4.5 commited on
Commit
8e83419
·
1 Parent(s): 9701750

fix: Add memory controls to prevent OOM on HF Jobs

Browse files

- Add pl.Config.set_streaming_chunk_size(1000) for large text docs
- Add chunk_size parameter to polars_to_generator (default: 100)
- Add --chunk-size CLI argument for user tuning
- Update HF Jobs command syntax in docstring

Fixes exit code 137 (OOM) when processing large text documents.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

1 file changed +71 -36
long-context-pdfs.py+71-36