Skip to content

convert : fix python 3.8 support, modernize type annotations#2916

Merged
monatis merged 9 commits intoggml-org:masterfrom
cebtenzzre:fix-convert-py38
Aug 31, 2023
Merged

convert : fix python 3.8 support, modernize type annotations#2916
monatis merged 9 commits intoggml-org:masterfrom
cebtenzzre:fix-convert-py38

Conversation

@cebtenzzre
Copy link
Copy Markdown
Collaborator

Follow-up to #2842.

Tested with for file in convert*.py; do python3.8 $file; done.

Copy link
Copy Markdown
Collaborator

@monatis monatis left a comment

Choose a reason for hiding this comment

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

Could you also please bump the version in pyproject.toml to 0.3.1 --I made a manual release with version 0.3.0. You can also tag that commit and push with tags to make a release directly.

@monatis monatis merged commit 92d0b75 into ggml-org:master Aug 31, 2023
@KerfuffleV2
Copy link
Copy Markdown
Contributor

Thanks for cleaning up my mess! Unfortunately, it seems like I missed quite a bit of stuff. :( My typed Python knowledge isn't that great, especially regarding differences between versions.

Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…g#2916)

* convert : fix python 3.8 support

* convert : sort imports

* convert : fix required parameters in convert-llama-ggmlv3-to-gguf

* convert : fix mypy errors in convert-llama-ggmlv3-to-gguf

* convert : use PEP 585 generics and PEP 604 unions

Now that we have `from __future__ import annotations`, we can use this
modern syntax in Python 3.7 instead of restricting support to Python 3.9
or 3.10 respectively.

* gguf.py : a tuple is already a tuple

* add mypy.ini

* convert : add necessary `type: ignore` comments

* gguf-py: bump version
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
…g#2916)

* convert : fix python 3.8 support

* convert : sort imports

* convert : fix required parameters in convert-llama-ggmlv3-to-gguf

* convert : fix mypy errors in convert-llama-ggmlv3-to-gguf

* convert : use PEP 585 generics and PEP 604 unions

Now that we have `from __future__ import annotations`, we can use this
modern syntax in Python 3.7 instead of restricting support to Python 3.9
or 3.10 respectively.

* gguf.py : a tuple is already a tuple

* add mypy.ini

* convert : add necessary `type: ignore` comments

* gguf-py: bump version
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.

3 participants