Tuesday, 21 February 2023

Looking to understand why my Kaggle Notebook isn't getting scored?

I have asked this on the Kaggle forums as well, but haven't gotten to the answer so I'm trying here as well.

I've spent quite sometime trying to understand why when I submit my Kaggle notebook it runs successfully, but does not get scored. I'm getting the "Notebook Threw Exception" error. I've spent some time reading the troubleshooting for this error and looking at other people's notebooks but haven't been able to resolve it. I understand the hidden test set is larger than the visible test set, but I believe I've handled that appropriately.

When I compare my submission CSV to the sample_submission, the format look identical.

Can anyone take a look at my notebook and see where I'm going wrong? It's not too long.

https://www.kaggle.com/code/conweezy/rsna-submission-test?scriptVersionId=119413061

I've narrowed it down to these lines of code returning the exception:

test_path = "/kaggle/input/rsna-breast-cancer-detection/test_images/"
all_paths = []

test_df = pd.read_csv("/kaggle/input/rsna-breast-cancer-detection/test.csv")

for k in range(len(test_df)):
    row = test_df.iloc[k, :]
    all_paths.append(test_path + str(row.patient_id) + "/" + str(row.image_id) + ".dcm")
    
test_df["path"] = all_paths
print(test_df.head)

X_test = []
for i in range(test_df.shape[0]):
    path = test_df['path'].iloc[i]
    xray = read_xray(path, 256)
    X_test.append(xray)

But I still can't figure out why this wouldn't work?



from Looking to understand why my Kaggle Notebook isn't getting scored?

No comments:

Post a Comment