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

Component' is not defined #3366

Closed
1 task done
NeoFii opened this issue Apr 21, 2024 · 2 comments
Closed
1 task done

Component' is not defined #3366

NeoFii opened this issue Apr 21, 2024 · 2 comments
Labels
solved This problem has been already solved

Comments

@NeoFii
Copy link

NeoFii commented Apr 21, 2024

Reminder

  • I have read the README and searched the existing issues.

Reproduction

在执行train_bash指令后出现报错Component' is not defined,请问是什么问题

Expected behavior

No response

System Info

No response

Others

No response

@NeoFii
Copy link
Author

NeoFii commented Apr 21, 2024

执行的指令是CUDA_VISIBLE_DEVICES=0 python src/train_bash.py
--stage sft
--do_train True
--model_name_or_path /hy-tmp/result
--finetuning_type lora
--template qwen
--dataset_dir data
--dataset alpaca_gpt4_zh
--cutoff_len 1024
--learning_rate 0.0002
--num_train_epochs 2.0
--max_samples 100000
--per_device_train_batch_size 4
--gradient_accumulation_steps 4
--lr_scheduler_type cosine
--max_grad_norm 1.0
--logging_steps 5
--save_steps 100
--warmup_steps 0
--optim adamw_torch
--report_to none
--output_dir /hy-tmp/LawModel
--fp16 True
--lora_rank 8
--lora_alpha 16
--lora_dropout 0.1
--use_dora True
--lora_target all
--plot_loss True
报错:
Traceback (most recent call last):
File "/root/LLaMA-Factory/src/train_bash.py", line 1, in
from llmtuner import run_exp
File "/root/LLaMA-Factory/src/llmtuner/init.py", line 7, in
from .webui import create_ui, create_web_demo
File "/root/LLaMA-Factory/src/llmtuner/webui/init.py", line 1, in
from .interface import create_ui, create_web_demo
File "/root/LLaMA-Factory/src/llmtuner/webui/interface.py", line 12, in
from .engine import Engine
File "/root/LLaMA-Factory/src/llmtuner/webui/engine.py", line 4, in
from .chatter import WebChatModel
File "/root/LLaMA-Factory/src/llmtuner/webui/chatter.py", line 23, in
class WebChatModel(ChatModel):
File "/root/LLaMA-Factory/src/llmtuner/webui/chatter.py", line 41, in WebChatModel
def load_model(self, data: Dict[Component, Any]) -> Generator[str, None, None]:
^^^^^^^^^
NameError: name 'Component' is not defined

@NeoFii NeoFii closed this as completed Apr 21, 2024
hiyouga added a commit that referenced this issue Apr 21, 2024
@hiyouga hiyouga added the solved This problem has been already solved label Apr 21, 2024
@hiyouga
Copy link
Owner

hiyouga commented Apr 21, 2024

安装 gradio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

2 participants