Specify file open permissions needed as read only. #943
Merged
martindevans merged 1 commit intoSciSharp:masterfrom Oct 8, 2024
Merged
Specify file open permissions needed as read only. #943martindevans merged 1 commit intoSciSharp:masterfrom
martindevans merged 1 commit intoSciSharp:masterfrom
Conversation
…iled in environments with strict read-only file system settings)
Member
|
This is a good idea, and I'll merge it after the tests have run. Thanks! However, I'm not sure if it will entirely fix the problem. The The model is really loaded with |
Contributor
Author
|
makes sense, but FWIW in my particular use case (i can't share too much of
the particulars as it came up during work), it did resolve an issue. the
filesystem in question simply didn't allow opening for write and would
throw an exception here, causing loading the model to fail outright here on
this line. I compiled this in and was able to successfully load the model
in context and the application moved on with life.
I then ran into OTHER issues, but that's an unrelated other story. =)
…On Tue, Oct 8, 2024 at 6:10 AM Martin Evans ***@***.***> wrote:
This is a good idea, and I'll merge it after the tests have run. Thanks!
However, I'm not sure if it will entirely fix the problem. The FileStream
there is not actually used to read the model, all we're doing is opening
and immediately closing the file. This acts as a sanity check that the file
exists and is readable before we pass off to llama.cpp to do the *actual*
work of reading the file.
The model is really loaded with llama_load_model_from_file (a couple of
lines down). I don't know whether ot not that loads the file with read-only
permissions.
—
Reply to this email directly, view it on GitHub
<#943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKHRFLQQFKKYCL33QZPGG7DZ2PKTTAVCNFSM6AAAAABPRILU56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJZHAYDKMBTHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default open behavior looks to be read/write. Resulting in failed file open of model in environments with strict read-only file system settings)