googleapis / googleapis/python-aiplatform

Configurable cache path for List token (local tokenizer file path)

オープン
#4,543 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
api: vertex-ai
主要言語
Python
スター
905
フォーク
465
平均マージ
1日 13時間
マージ済み PR(30日)
44

説明

**Is your feature request related to a problem? Please describe.**
Currently Google aiplatform loads tokenizer by either downloading from github or reading from a tmpdir cache path which is not configurable at a library level. https://github.com/googleapis/python-aiplatform/blob/main/vertexai/tokenization/_tokenizer_loading.py#L136-L147

Can we make it configurable like how TikToken or NLK does it ? https://github.com/openai/tiktoken/blob/main/tiktoken/load.py#L34-L42 With a env variable like `VERTEX_TOKENIZER_CACHE_DIR` ?

**Describe the solution you'd like**

Our org does not allow network download of file on our deployment servers, so we need to uplaod the file to a fixed read only directory on the server. Being able to configure the path for that server would be useful.

**Describe alternatives you've considered**

I tried setting the TMPDIR env variable, but that works at python global level for all libraries and does not seem very configurable.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。