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

Make sure gguf_ctx is closed when error happens #1699

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

zcbenz
Copy link
Contributor

@zcbenz zcbenz commented Dec 14, 2024

Refs #1513.

This PR makes sure the gguf_ctx is closed when exception is thrown in save_gguf and load_gguf. Without doing would leave the files opened and result in test failures on Windows, as it does not allow writing to already opened files.

Copy link
Member

@awni awni left a comment

Choose a reason for hiding this comment

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

Nice! Though I thought you weren't building gguf on windows?

@zcbenz
Copy link
Contributor Author

zcbenz commented Dec 14, 2024

I'm making gguf-tools work on Windows.

@awni awni merged commit 4768c61 into ml-explore:main Dec 14, 2024
5 checks passed
@zcbenz zcbenz deleted the gguf-close branch January 29, 2025 11:15
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.

2 participants