diff --git a/backend-python/routes/state_cache.py b/backend-python/routes/state_cache.py index 62d5570..109558c 100644 --- a/backend-python/routes/state_cache.py +++ b/backend-python/routes/state_cache.py @@ -96,7 +96,7 @@ def add_state(body: AddStateBody): quick_log( None, None, - f"New Trie Id: {id}\nTrie Len: {len(trie)}\nTrie Buff Size: {trie.buff_size()}\nDtrie Buff Size Of Id: {_get_a_dtrie_buff_size(dtrie[id])}", + f"New Trie Id: {id}\nTrie Len: {len(trie)}\nTrie Buff Size: {trie.buff_size()}\nDtrie Buff Size Of Id: {__get_a_dtrie_buff_size(dtrie[id])}", ) return "success" except Exception as e: @@ -124,7 +124,7 @@ class LongestPrefixStateBody(BaseModel): prompt: str -def _get_a_dtrie_buff_size(dtrie_v): +def __get_a_dtrie_buff_size(dtrie_v): # print(sys.getsizeof(dtrie_v["tokens"][0])) # str # print(sys.getsizeof(dtrie_v["tokens"][0]) * len(dtrie_v["tokens"])) # print(dtrie_v["state"][0][0].element_size()) diff --git a/finetune/install-wsl-dep-and-train.sh b/finetune/install-wsl-dep-and-train.sh index 4bbcda8..a27b3a4 100644 --- a/finetune/install-wsl-dep-and-train.sh +++ b/finetune/install-wsl-dep-and-train.sh @@ -1,3 +1,5 @@ +echo $@ + if [[ ${cnMirror} == 1 ]]; then export PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple" if grep -q "mirrors.aliyun.com" /etc/apt/sources.list; then diff --git a/frontend/src/pages/Configs.tsx b/frontend/src/pages/Configs.tsx index 4fd4bed..a6d8296 100644 --- a/frontend/src/pages/Configs.tsx +++ b/frontend/src/pages/Configs.tsx @@ -130,7 +130,7 @@ export const Configs: FC = observer(() => { setSelectedIndex(0); setSelectedConfig(commonStore.modelConfigs[0]); }} /> - } text={mq ? t('Save Config') : ''} + } text={mq ? t('Save Config') : null} onClick={onClickSave} />
diff --git a/frontend/src/pages/Train.tsx b/frontend/src/pages/Train.tsx index ca3ef46..15ea937 100644 --- a/frontend/src/pages/Train.tsx +++ b/frontend/src/pages/Train.tsx @@ -219,7 +219,7 @@ const Terminal: FC = observer(() => { WslStart().then(() => { addWslMessage('WSL> ' + input); setInput(''); - WslCommand(input).catch(showError); + WslCommand(input).then(WindowShow).catch(showError); }).catch(showError); } };