Skip to content
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

Version parsing fails on pytorch alpha #142

Closed
keturn opened this issue Dec 27, 2022 · 2 comments · Fixed by #143
Closed

Version parsing fails on pytorch alpha #142

keturn opened this issue Dec 27, 2022 · 2 comments · Fixed by #143

Comments

@keturn
Copy link

keturn commented Dec 27, 2022

Pytorch may reportedly have a version string like 2.0.0a0+gitd1123c9 when compiled from source. That makes the safetensors Version parser fail with Python patch version not an integer

let patch = patch_str
.parse()
.map_err(|_| "Python patch version not an integer")?;

Reported by @lstein.

@lstein
Copy link

lstein commented Dec 28, 2022 via email

@Narsil
Copy link
Collaborator

Narsil commented Dec 28, 2022

Ok, thanks for the clarification !.
Need to change that error message, I couldn't even find it.

And in case the version cannot be parsed we can adopt a default behavior instead of crashing. Thanks for the tip !

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 a pull request may close this issue.

3 participants