chore
This commit is contained in:
parent
a057bb6c5b
commit
02d5d641d1
backend-python/routes
finetune
frontend/src/pages
@ -96,7 +96,7 @@ def add_state(body: AddStateBody):
|
|||||||
quick_log(
|
quick_log(
|
||||||
None,
|
None,
|
||||||
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"
|
return "success"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -124,7 +124,7 @@ class LongestPrefixStateBody(BaseModel):
|
|||||||
prompt: str
|
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])) # str
|
||||||
# print(sys.getsizeof(dtrie_v["tokens"][0]) * len(dtrie_v["tokens"]))
|
# print(sys.getsizeof(dtrie_v["tokens"][0]) * len(dtrie_v["tokens"]))
|
||||||
# print(dtrie_v["state"][0][0].element_size())
|
# print(dtrie_v["state"][0][0].element_size())
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
echo $@
|
||||||
|
|
||||||
if [[ ${cnMirror} == 1 ]]; then
|
if [[ ${cnMirror} == 1 ]]; then
|
||||||
export PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
|
export PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
|
||||||
if grep -q "mirrors.aliyun.com" /etc/apt/sources.list; then
|
if grep -q "mirrors.aliyun.com" /etc/apt/sources.list; then
|
||||||
|
@ -130,7 +130,7 @@ export const Configs: FC = observer(() => {
|
|||||||
setSelectedIndex(0);
|
setSelectedIndex(0);
|
||||||
setSelectedConfig(commonStore.modelConfigs[0]);
|
setSelectedConfig(commonStore.modelConfigs[0]);
|
||||||
}} />
|
}} />
|
||||||
<ToolTipButton desc={mq ? '' : t('Save Config')} icon={<Save20Regular />} text={mq ? t('Save Config') : ''}
|
<ToolTipButton desc={mq ? '' : t('Save Config')} icon={<Save20Regular />} text={mq ? t('Save Config') : null}
|
||||||
onClick={onClickSave} />
|
onClick={onClickSave} />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
|
@ -219,7 +219,7 @@ const Terminal: FC = observer(() => {
|
|||||||
WslStart().then(() => {
|
WslStart().then(() => {
|
||||||
addWslMessage('WSL> ' + input);
|
addWslMessage('WSL> ' + input);
|
||||||
setInput('');
|
setInput('');
|
||||||
WslCommand(input).catch(showError);
|
WslCommand(input).then(WindowShow).catch(showError);
|
||||||
}).catch(showError);
|
}).catch(showError);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user