-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Bug]: Local tiktoken fails writing to non-writeable directory in sandboxed macOS application #2607
Comments
I'm facing the same issue using the codium/pr-agent deployed to a AWS Lamda function (I've also opened an issue there: Codium-ai/pr-agent#909). Since the lamda filesystem is read-only (except for the |
I have pretty much the same issue with litellm 1.38.11 and tiktoken 0.7.0 in my docker container. litellm patches the env var
|
This comment was marked as outdated.
This comment was marked as outdated.
@tnunamak @maurobender @Jonas1312 |
This comment seems off, it is just |
@fingon Are you still having problems? litellm/utils.py top level code os.environ["TIKTOKEN_CACHE_DIR"] = os.getenv("CUSTOM_TIKTOKEN_CACHE_DIR", filename) |
In our case, the beautiful fix was just to import litellm and set the |
What happened?
litellm writes to the filesystem during initialization. I'm building a macOS application and this causes a read-only filesystem error:
Some investigation shows that it's due to this code, (original PR here).
As a workaround, perhaps this behavior could be disabled or TIKTOKEN_CACHE_DIR could be left alone if it is already set?
Relevant log output
The text was updated successfully, but these errors were encountered: