googleapis / googleapis/python-aiplatform

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

Đang mở
#4,543 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: vertex-ai
Ngôn ngữ chính
Python
Star
905
Fork
465
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Mô tả

**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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.