Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文社区提供的微调代码运行报错,好像是pytest有问题我也不太清楚,有没有大佬帮忙看一下 #303

Open
bapu3212 opened this issue Mar 12, 2024 · 1 comment

Comments

@bapu3212
Copy link

Traceback (most recent call last):
File "/root/autodl-tmp/Llama2-Chinese/train/sft/finetune_clm_lora.py", line 65, in
from transformers.testing_utils import CaptureLogger
File "/root/miniconda3/lib/python3.10/site-packages/transformers/testing_utils.py", line 131, in
from _pytest.doctest import (
ImportError: cannot import name 'Module' from '_pytest.doctest' (/root/miniconda3/lib/python3.10/site-packages/_pytest/doctest.py)
[2024-03-12 23:15:41,907] [INFO] [launch.py:316:sigkill_handler] Killing subprocess 3557
[2024-03-12 23:15:41,908] [ERROR] [launch.py:322:sigkill_handler] ['/root/miniconda3/bin/python', '-u', 'finetune_clm_lora.py', '--local_rank=0', '--model_name_or_path', 'FlagAlpha/Atom-7B-Chat', '--train_files', '../../data/train_sft.csv', '--validation_files', '../../data/dev_sft.csv', '../../data/dev_sft_sharegpt.csv', '--per_device_train_batch_size', '1', '--per_device_eval_batch_size', '1', '--do_train', '--do_eval', '--use_fast_tokenizer', 'false', '--output_dir', 'save_folder', '--evaluation_strategy', 'steps', '--max_eval_samples', '800', '--learning_rate', '1e-4', '--gradient_accumulation_steps', '8', '--num_train_epochs', '10', '--warmup_steps', '400', '--load_in_bits', '4', '--lora_r', '8', '--lora_alpha', '32', '--target_modules', 'q_proj,k_proj,v_proj,o_proj,down_proj,gate_proj,up_proj', '--logging_dir', 'save_folder/logs', '--logging_strategy', 'steps', '--logging_steps', '10', '--save_strategy', 'steps', '--preprocessing_num_workers', '10', '--save_steps', '20', '--eval_steps', '20', '--save_total_limit', '2000', '--seed', '42', '--disable_tqdm', 'false', '--ddp_find_unused_parameters', 'false', '--block_size', '2048', '--report_to', 'tensorboard', '--overwrite_output_dir', '--deepspeed', 'ds_config_zero2.json', '--ignore_data_skip', 'true', '--bf16', '--gradient_checkpointing', '--bf16_full_eval', '--ddp_timeout', '18000000'] exits with return code = 1

@zzhiyun
Copy link

zzhiyun commented Mar 13, 2024

可以尝试注释掉代码第503和65行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants