improve error messages for training

This commit is contained in:
josc146
2023-07-09 11:39:44 +08:00
parent 22afc98be5
commit fcc3886db1
2 changed files with 7 additions and 5 deletions

View File

@@ -147,17 +147,18 @@ const loraFinetuneParametersOptions: Array<[key: keyof LoraFinetuneParameters, t
const showError = (e: any) => {
const msg = e.message || e;
if (msg === 'wsl not running') {
toast(t('WSL is not running. You may be using an outdated version of WSL, run "wsl --update" to update.'), { type: 'error' });
toast(t('WSL is not running, please retry. If it keeps happening, it means you may be using an outdated version of WSL, run "wsl --update" to update.'), { type: 'error' });
} else {
toast(t(msg), { type: 'error' });
toast(t(msg), { type: 'error', toastId: 'train_error' });
}
};
const errorsMap = Object.entries({
'killed python3 ./finetune/lora/train.py': 'Memory is not enough, try to increase the virtual memory or use a smaller base model.',
'python3 ./finetune/lora/train.py': 'Memory is not enough, try to increase the virtual memory or use a smaller base model.',
'cuda out of memory': 'VRAM is not enough',
'valueerror: high <= 0': 'Training data is not enough, reduce context length or add more data for training',
'+= \'+ptx\'': 'You are using WSL 1 for training, please upgrade to WSL 2. e.g. Run "wsl --set-version Ubuntu-22.04 2"',
'size mismatch for blocks': 'Size mismatch for blocks. You are attempting to continue training from the LoRA model, but it does not match the base model. Please set LoRA model to None.',
'cuda_home environment variable is not set': 'Matched CUDA is not installed',
'unsupported gpu architecture': 'Matched CUDA is not installed',
'error building extension \'fused_adam\'': 'Matched CUDA is not installed'