CASIA-IVA-Lab / AnomalyGPT

[AAAI 2024 Oral] AnomalyGPT: Detecting Industrial Anomalies Using Large Vision-Language Models
https://anomalygpt.github.io
Other
672 stars 81 forks source link

command not found #68

Open MliarD opened 5 months ago

MliarD commented 5 months ago

Thank you for your excellent contribution, but I have a few questions I would like to ask you. I followed the instructions and successfully ran web_demo.py, but when I tried to train my own AnomalyGPT, I encountered the following error: (ysh-anomalygpt) ubuntu@ubuntu-NEU:~/data1/yangshuhan/anomalygpt/code$ bash ./scripts/train_visa.sh [2024-01-25 15:09:04,574] [WARNING] [runner.py:191:fetch_hostfile] Unable to find hostfile, will proceed with training with local resources only. [2024-01-25 15:09:04,589] [INFO] [runner.py:541:main] cmd = /home/ubuntu/miniconda3/envs/ysh-anomalygpt/bin/python -u -m deepspeed.launcher.launch --world_info=eyJsb2NhbGhvc3QiOiBbMCwgMV19 --master_addr=127.0.0.1 --master_port=28412 --enable_each_rank_log=None train_visa.py [2024-01-25 15:09:05,978] [INFO] [launch.py:229:main] WORLD INFO DICT: {'localhost': [0, 1]} [2024-01-25 15:09:05,978] [INFO] [launch.py:235:main] nnodes=1, num_local_procs=2, node_rank=0 [2024-01-25 15:09:05,978] [INFO] [launch.py:246:main] global_rank_mapping=defaultdict(<class 'list'>, {'localhost': [0, 1]}) [2024-01-25 15:09:05,978] [INFO] [launch.py:247:main] dist_world_size=2 [2024-01-25 15:09:05,978] [INFO] [launch.py:249:main] Setting CUDA_VISIBLE_DEVICES=0,1 /home/ubuntu/miniconda3/envs/ysh-anomalygpt/lib/python3.10/site-packages/torchvision/transforms/_functional_video.py:6: UserWarning: The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms.functional' module instead. warnings.warn( /home/ubuntu/miniconda3/envs/ysh-anomalygpt/lib/python3.10/site-packages/torchvision/transforms/_transforms_video.py:22: UserWarning: The 'torchvision.transforms._transforms_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms' module instead. warnings.warn( /home/ubuntu/miniconda3/envs/ysh-anomalygpt/lib/python3.10/site-packages/torchvision/transforms/_functional_video.py:6: UserWarning: The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms.functional' module instead. warnings.warn( /home/ubuntu/miniconda3/envs/ysh-anomalygpt/lib/python3.10/site-packages/torchvision/transforms/_transforms_video.py:22: UserWarning: The 'torchvision.transforms._transforms_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms' module instead. warnings.warn( usage: train_visa.py [-h] [--model MODEL] [--local_rank LOCAL_RANK] [--save_path SAVE_PATH] [--log_path LOG_PATH] [--imagebind_ckpt_path IMAGEBIND_CKPT_PATH] [--vicuna_ckpt_path VICUNA_CKPT_PATH] [--delta_ckpt_path DELTA_CKPT_PATH] [--max_tgt_len MAX_TGT_LEN] [--stage STAGE] [--data_path DATA_PATH] [--image_root_path IMAGE_ROOT_PATH] train_visa.py: error: unrecognized arguments: usage: train_visa.py [-h] [--model MODEL] [--local_rank LOCAL_RANK] [--save_path SAVE_PATH] [--log_path LOG_PATH] [--imagebind_ckpt_path IMAGEBIND_CKPT_PATH] [--vicuna_ckpt_path VICUNA_CKPT_PATH] [--delta_ckpt_path DELTA_CKPT_PATH] [--max_tgt_len MAX_TGT_LEN] [--stage STAGE] [--data_path DATA_PATH] [--image_root_path IMAGE_ROOT_PATH] train_visa.py: error: unrecognized arguments: [2024-01-25 15:09:12,985] [INFO] [launch.py:428:sigkill_handler] Killing subprocess 3092595 [2024-01-25 15:09:12,985] [INFO] [launch.py:428:sigkill_handler] Killing subprocess 3092596 [2024-01-25 15:09:12,993] [ERROR] [launch.py:434:sigkill_handler] ['/home/ubuntu/miniconda3/envs/ysh-anomalygpt/bin/python', '-u', 'train_visa.py', '--local_rank=1', '\r'] exits with return code = 2 ./scripts/train_visa.sh: line 3: --model: command not found ./scripts/train_visa.sh: line 4: --stage: command not found ./scripts/train_visa.sh: line 5: --imagebind_ckpt_path: command not found ./scripts/train_visa.sh: line 6: --vicuna_ckpt_path: command not found ./scripts/train_visa.sh: line 7: --delta_ckpt_path: command not found ./scripts/train_visa.sh: line 8: --max_tgt_len: command not found ./scripts/train_visa.sh: line 9: --data_path: command not found ./scripts/train_visa.sh: line 10: --image_root_path: command not found ./scripts/train_visa.sh: line 11: --save_path: command not found ./scripts/train_visa.sh: line 12: --log_path: command not found

MliarD commented 5 months ago

I also tried manually entering parameters in train_visa.py and started with train_visa.py. Everything looked fine but there was another error: Nameerror is about LoraConfig, but class LoraConfig exists, and I'm still trying to figure it out.