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

How to debug this code? #96

Open
fengchuibeixiang opened this issue Jan 26, 2024 · 9 comments
Open

How to debug this code? #96

fengchuibeixiang opened this issue Jan 26, 2024 · 9 comments

Comments

@fengchuibeixiang
Copy link

image
I set default value to all click parameter, but it still gives error abrove.
image
image
image

@YXDZZU
Copy link

YXDZZU commented Mar 8, 2024

I encountered the same problem as you, have you solved it?

@fengchuibeixiang
Copy link
Author

I encountered the same problem as you, have you solved it?

图片
图片
把在命令行运行时的参数放在图示的形参处即可

@zwl8979
Copy link

zwl8979 commented Jun 10, 2024

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly?
image

@fengchuibeixiang
Copy link
Author

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this
--gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 results patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset dataset --resize 256 --imagesize 224 mvtec mvtec

@zwl8979
Copy link

zwl8979 commented Jun 11, 2024

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 results patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset dataset --resize 256 --imagesize 224 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command.
--gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset
image
image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))

@fengchuibeixiang
Copy link
Author

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 results patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset dataset --resize 256 --imagesize 224 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command. --gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset image image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))

if your code ends at main(), perhaps your parameter is not set up correctly. maybe it lose some parameter or have some wrong parameter
1.check your environment and datasets
2.try to run this code in terminal according to readme.md (or use the parameter I comment above)
3.if 2 is fine, try to put the parameter to "Parameters" in "Edit Configurations", then debug
4.if 2 is not fine, check and change your parameter

2 similar comments
@fengchuibeixiang
Copy link
Author

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 results patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset dataset --resize 256 --imagesize 224 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command. --gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset image image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))

if your code ends at main(), perhaps your parameter is not set up correctly. maybe it lose some parameter or have some wrong parameter
1.check your environment and datasets
2.try to run this code in terminal according to readme.md (or use the parameter I comment above)
3.if 2 is fine, try to put the parameter to "Parameters" in "Edit Configurations", then debug
4.if 2 is not fine, check and change your parameter

@fengchuibeixiang
Copy link
Author

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 results patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset dataset --resize 256 --imagesize 224 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command. --gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset image image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))

if your code ends at main(), perhaps your parameter is not set up correctly. maybe it lose some parameter or have some wrong parameter
1.check your environment and datasets
2.try to run this code in terminal according to readme.md (or use the parameter I comment above)
3.if 2 is fine, try to put the parameter to "Parameters" in "Edit Configurations", then debug
4.if 2 is not fine, check and change your parameter

@Johnysama22
Copy link

Good! According to your tips, it took me a day to successfully debug this code in VScode. During that time, I thought twice about giving up debug this code...
1732265577893

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

4 participants