# IDs are not correct

**URL:** <https://community.drivendata.org/t/ids-are-not-correct/5280>\
**Category:** TissueNet: Detect Lesions in Cervical Biopsies\
**Created:** [October 8, 2020, 3:12pm UTC](https://community.drivendata.org/t/ids-are-not-correct/5280 "2020-10-08T15:12:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewTal](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AndrewTal](https://community.drivendata.org/u/AndrewTal)\
**Post date:** [October 8, 2020, 3:12pm UTC](https://community.drivendata.org/t/ids-are-not-correct/5280/1 "2020-10-08T15:12:01Z")

</div>

I submit my code and generated a submission.csv. but I got this error:

IDs for submission are not correct.

My code:

submit\_csv = pd.DataFrame(columns=[‘filename’, 0, 1, 2, 3])  
wsi\_list = glob.glob(’./data/\*.tif’)  
for idx, item in enumerate(wsi\_list):  
base\_name = item.split(’/’)[-1]  
pred = 0 or 1 or 2 or 3  
submit\_csv.loc[idx] = [base\_name] + np.uint8(np.eye(4)[pred]).tolist()  
submit\_csv.to\_csv(’./submission.csv’, index=None)

I didn’t find any difference. Does anyone know the reason?

---

<div class="post-metadata">

**Author:** ![bull](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/bull/32/8_2.png) [@bull](https://community.drivendata.org/u/bull)\
**Post date:** [October 8, 2020, 3:48pm UTC](https://community.drivendata.org/t/ids-are-not-correct/5280/2 "2020-10-08T15:48:32Z")

</div>

The submission format needs to match `submission_format.csv` exactly. This includes the header, the index values, and the order of the rows. The easiest way is to load and iterate through `submission_fromat.csv` rather than globbing the filenames, like we do in the benchmark:

> <https://github.com/drivendataorg/sfp-cervical-biopsy-runtime/blob/master/benchmark/main.py#L11-L22>

---

<div class="post-metadata">

**Author:** ![AndrewTal](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@AndrewTal](https://community.drivendata.org/u/AndrewTal)\
**Post date:** [October 8, 2020, 3:51pm UTC](https://community.drivendata.org/t/ids-are-not-correct/5280/3 "2020-10-08T15:51:24Z")

</div>

Got it, thanks a lot!
