Skip to content

Commit 3c36283

Browse files
authored
[ENV] support AK SK ENCPOINT while get the multi_modal's feature (#5159)
1 parent 34f59d9 commit 3c36283

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

fastdeploy/envs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,12 @@
153153
"FD_MODEL_USE_SAFETENSORS": lambda: int(os.getenv("FD_MODEL_USE_SAFETENSORS", "1")) == 1,
154154
"FD_MODEL_USE_OFFLINE_QUANT": lambda: int(os.getenv("FD_MODEL_USE_OFFLINE_QUANT", "1")) == 1,
155155
"FD_MOE_QUANT_TYPE": lambda: os.getenv("FD_MOE_QUANT_TYPE", "w4a8"),
156+
# The AK of bos storing the features while multi_modal infer
156157
"ENCODE_FEATURE_BOS_AK": lambda: os.getenv("ENCODE_FEATURE_BOS_AK"),
158+
# The SK of bos storing the features while multi_modal infer
157159
"ENCODE_FEATURE_BOS_SK": lambda: os.getenv("ENCODE_FEATURE_BOS_SK"),
160+
# The ENDPOINT of bos storing the features while multi_modal infer
161+
"ENCODE_FEATURE_ENDPOINT": lambda: os.getenv("ENCODE_FEATURE_ENDPOINT"),
158162
# Enable offline perf test mode for PD disaggregation
159163
"FD_OFFLINE_PERF_TEST_FOR_PD": lambda: int(os.getenv("FD_OFFLINE_PERF_TEST_FOR_PD", "0")),
160164
"FD_ENABLE_E2W_TENSOR_CONVERT": lambda: int(os.getenv("FD_ENABLE_E2W_TENSOR_CONVERT", "0")),

fastdeploy/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,8 @@ def init_bos_client():
972972
from baidubce.services.bos.bos_client import BosClient
973973

974974
cfg = BceClientConfiguration(
975-
credentials=BceCredentials(envs.ENCODE_FEATURE_BOS_AK, envs.ENCODE_FEATURE_BOS_SK), endpoint="bj.bcebos.com"
975+
credentials=BceCredentials(envs.ENCODE_FEATURE_BOS_AK, envs.ENCODE_FEATURE_BOS_SK),
976+
endpoint=envs.ENCODE_FEATURE_ENDPOINT,
976977
)
977978
return BosClient(cfg)
978979

0 commit comments

Comments
 (0)