Skip to content

Implement backend caching and add GIF benchmarking and plotting tools#2

Merged
ehewes merged 3 commits into
mainfrom
ehewes/pyframe-scale
Jun 7, 2026
Merged

Implement backend caching and add GIF benchmarking and plotting tools#2
ehewes merged 3 commits into
mainfrom
ehewes/pyframe-scale

Conversation

@ehewes

@ehewes ehewes commented Jun 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

ehewes added 3 commits June 7, 2026 20:38
Add scripts/bench_gifs.py (comprehensive GIF moderation pipeline benchmark) and scripts/plot_results.py (generate media/perf_stages.png and media/perf_latency.png from bench_results.jsonl). Update docs/performance.md to document installing bench deps and the new bench/plot workflow. Tweak scripts/bench_decode.py wording to clarify that ViT inference dominates wall-clock (~91%) and adjust the delta message. bench_gifs runs the real prescreen pipeline (precise backend stubbed), outputs per-GIF JSONL and scaling/timing analysis.
Add caching for constructed backends to avoid reloading large model weights per invocation: introduce _cache, _cache_lock, _construct, and a cache-aware load_backend (with cache=False bypass). Export clear_backend_cache() to allow tests or users to drop cached backends. Update package exports to include clear_backend_cache. Update CLI to build a Config and create a single Scanner.from_config() (reusing the constructed backend) and then scan each path with that scanner, handling BackendUnavailableError up-front. Also update two performance images (media/perf_latency.png, media/perf_stages.png).
Update project version in pyproject.toml and synchronize the __version__ fallback values in src/pyframe/__init__.py to 0.3.0 in preparation for a new release.
@ehewes ehewes merged commit 728ca4d into main Jun 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant