Skip to content

build: bump python 3.13 - #624

Merged
gsprochette merged 3 commits into
mainfrom
build/bump-python313
Apr 21, 2026
Merged

build: bump python 3.13#624
gsprochette merged 3 commits into
mainfrom
build/bump-python313

Conversation

@gsprochette

Copy link
Copy Markdown
Collaborator

Description

This PR bumps the max version of python to 3.13 and isolates realsrgan into its own extra since the setup of its basicsr dependency fails with the new python version.

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor (no functional change)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing

  • I added or updated tests covering my changes
  • Existing tests pass locally (uv run pytest -m "cpu and not slow")

For full setup and testing instructions, see the Contributing Guide.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code, especially for agent-assisted changes
  • I updated the documentation where necessary

Thanks for contributing to Pruna! We're excited to review your work.

New to contributing? Check out our Contributing Guide for everything you need to get started.

Note:

  • Draft PRs or PRs without a clear and detailed overview may be delayed.
  • Please mark your PR as Ready for Review and ensure the sections above are filled out.
  • Contributions that are entirely AI-generated without meaningful human review are discouraged.

First Prune (1-year OSS anniversary)

First Prune marks one year of Pruna’s open-source work. During the initiative window, qualifying merged contributions count toward First Prune. You can earn credits for our performance models via our API.

If you’d like your contribution to count toward First Prune, here’s how it works:

  • Initiative window: First Prune starts on March 31.
  • Issue assignment: For your PR to count toward First Prune, the related issue must be assigned to the contributor opening the PR. Issues are labeled with first-prune.
  • Open for review: Please open your PR and mark it ready for review by April 30 (end of April).
  • Review priority: We’ll make our best effort to review quickly any PR that is open and has a review request before April 30.
  • Credits: Each qualifying merged PR earns 30 credits. We’ll be in touch after all qualifying PRs for First Prune have been merged.
  • To get started: Have a look at all models. You’ll need to sign up on the dashboard before you can redeem your credits.

@gsprochette
gsprochette requested a review from begumcig April 10, 2026 16:06
@codacy-production

codacy-production Bot commented Apr 10, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes. Give us feedback

@begumcig begumcig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LET'S GOOOOOOOOOOOOOO

@github-actions

Copy link
Copy Markdown

This PR has been inactive for 10 days and is now marked as stale.

@github-actions github-actions Bot added the stale label Apr 21, 2026
@gsprochette
gsprochette force-pushed the build/bump-python313 branch from 08ed0fa to 69931d4 Compare April 21, 2026 14:29
@gsprochette
gsprochette force-pushed the build/bump-python313 branch from 69931d4 to a39e655 Compare April 21, 2026 15:06
@gsprochette
gsprochette merged commit 66aa160 into main Apr 21, 2026
9 checks passed
@gsprochette
gsprochette deleted the build/bump-python313 branch April 21, 2026 15:31
krishjp pushed a commit to krishjp/pruna that referenced this pull request Apr 21, 2026
* build: bump max python to 3.13

* build: isolate realesrgan in a extra because no 3.13 basicsr wheels are available
llcnt added a commit that referenced this pull request Jun 18, 2026
…form usage (#616)

* feat: implement llama.cpp algorithm

* feat: llama.cpp conversion by forcing f16 for tiny models and bypass device checks for llama-cpp models due to a lack of model.parameters() support

* fix: preserve enum membership for callables in engine to support Python 3.13

- addressed functools.partial object compatability with py 3.13
- integrated enum.member() in SAVE_FUNCTIONS and LOAD_FUNCTIONS
- updated the LlamaCpp algorithm implementation to utilize the standardized
  naming convention.
- cleaned up redundant commented-out logic in the save_pruna_model function.

Verified through restoration of LlamaCpp integration tests and diagnostic
scripts confirming Enum member registration.

* feat: integrate Llama.cpp and enhance engine stability for cross-platform usage

- standardized LlamaCpp implementation and naming conventions within the engine
- implemented cache directory cleanup to prevent shutdown errors on Windows
- added a save() alias to the base model wrapper for improved API consistency
- updated project configuration with Llama.cpp and dependency group
- benchmarked using SmolLM2-135M-Instruct with q4_k_m quantization

* fix: integrity verification of remote scripts

* fix: ruff typechecking and shutil.move on GGUF file handling

* feat: updated llama support with rebased head branch commits
- added Int class for integer-based configuration.
- updated get_device and model_checks for llama_cpp.
- implemented secure conversion script caching.
- enabled TestLlamaCpp and removed manual test overrides.

* fix: ruff check fixes and llama_cpp updates

* refactor: llama_cpp code length update and extra comments for visibility

* refactor: code complexity

* refactor: removed dead code from save_model_llama_cpp in save.py

* feat: initial implementation for rapidata (#581)

* feat: initial implementation for rapidata

* ci: add rapidata dependency and some cleanup

* Guard optional rapidata metric import and tighten validation

Applied via @cursor push command

* refactor: address PR comments

* feat: add polling and address further PR comments

* refactor: add mixin for setting context

* ci: add evaluation as an umbrella dep

* refactor: address PR comments

* ci: separate rapidata matrix

* fix: minor issues

* ci: make tests import safe

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>

* refactor: required review changes and additional comments to address llama.cpp compatibility

* fix: subprocess run updates to prevent injection vulnerabilities

* build: bump python 3.13 (#624)

* build: bump max python to 3.13

* build: isolate realesrgan in a extra because no 3.13 basicsr wheels are available

* feat(llama_cpp): update conversion script and improve tokenizer fallbacks
- Pinned convert_hf_to_gguf.py to tag b8958
- Added automated model tokenizer resolution logic
- Introduced .get() operators to SmashConfig wrappers
- Refactored pyproject.toml

* fix: updated llama_cpp default hyperparameters and save logic

* fix: temp directory cleanup and ruff check

* feat: integrate llama_cpp algorithm backend and update conversion version
- Update ggml-org/llama.cpp conversion script to version tag b9670
- Register llamacpp in CI tests.yaml workflows matrix
- Add pruna[llamacpp] to optional dev deps

* fix: load llama.cpp config settings and support unwrapped PrunaModel device retrieval
- Apply n_gpu_layers and main_gpu config settings during llama_cpp model reload
- Unwrap PrunaModel wrappers in get_device to retrieve internal device of llama.cpp models correctly

* fix: latest conversion script version has been refactored, need to pin older one

* fix: rebuild llama-cpp-python from source on pruna cpu runners

* fix: rebase on main that just changed CI

* fix: solve llamacpp symetry compatibility

---------

Co-authored-by: Begüm Çığ <begumcig@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Gaspar Rochette <gaspar.rochette@pruna.ai>
Co-authored-by: llcnt <73026329+llcnt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants