Skip to content

fix convert.py not working with int filename_stem #3028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

Green-Sky
Copy link
Collaborator

fix implicit int to string conversion not working on python 3.8.10

TypeError: can only concatenate str (not "int") to str

@cebtenzzre
Copy link
Collaborator

I'm curious what model files you can reproduce this with. The pytorch files I've tried have a str for filename_stem. And this is not specific to python 3.8; I believe it will happen on any python version. str + int is always disallowed.

@KerfuffleV2
Copy link
Collaborator

I'm curious what model files you can reproduce this with.

Pickle's an insane format. I can definitely believe weird stuff like this can happen.

There should probably be a check to make sure it's either string or int? Otherwise it can be some random object.

@Green-Sky
Copy link
Collaborator Author

unsure, bit i needed it for https://huggingface.co/PY007/TinyLlama-1.1B-step-50K-105b/

@Green-Sky
Copy link
Collaborator Author

@Green-Sky Green-Sky changed the title fix convert.py not working on python 3.8.10 fix convert.py not working with int filename_stem Sep 5, 2023
@Green-Sky Green-Sky merged commit c9c3220 into ggml-org:master Sep 5, 2023
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