mahmoodlab / CLAM

Data-efficient and weakly supervised computational pathology on whole slide images - Nature Biomedical Engineering

Home Page:http://clam.mahmoodlab.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running eval.py

suminwei opened this issue · comments

Hi,
I'm running into issue when running eval.py:
CUDA_VISIBLE_DEVICES=0 python $EVAL --drop_out --k 10 --models_exp_code $DATA_ROOT_DIR/training_2/results/task_2_tumor_subtyping_CLAM_75_s1 --save_exp_code task_2_tumor_subtyping_CLAM_75_s1_cv --task task_2_tumor_subtyping --model_type clam_sb --results_dir results --data_root_dir $DATA_ROOT_DIR

I get the following error:

Init Loaders Traceback (most recent call last): File "/n/data1/dfci/medicine/beltran/lab/lwei/Software/CLAM_install/CLAM/eval_SARC_KICH.py", line 133, in <module> model, patient_results, test_error, auc, df = eval(split_dataset, args, ckpt_paths[ckpt_idx]) File "/n/data1/dfci/medicine/beltran/lab/lwei/Software/CLAM_install/CLAM/utils/eval_utils.py", line 53, in eval patient_results, test_error, auc, df, _ = summary(model, loader, args) File "/n/data1/dfci/medicine/beltran/lab/lwei/Software/CLAM_install/CLAM/utils/eval_utils.py", line 89, in summary del data UnboundLocalError: local variable 'data' referenced before assignment

I have also encountered this problem. Have you resolved it?

This would suggest that there is no data in your loader. It is worth checking your csv_path and data_root_dir, and it may be worth printing out the dimension of the split_dataset in your eval.py file to see if it is populated

Hi @scjjb , thank you, I checked by csv_path and data_root_dir, and they are both populated and match up. I'm not sure where to find the split_dataset and how to take a look at it?

YOU need change the csv_path in eval.py.