Fix Windows-incompatible mkdir and add COCO auto-download to tutorial notebook - #613
ashishsoni-ai wants to merge 3 commits into
Conversation
|
Hi @ashishsoni-ai , nice contribution! The only thing that needs fixing before merging is removing duplicated imports and moving those that are actually new to the first cell for consistency |
… notebook - Replace Unix-only '!mkdir -p' with cross-platform os.makedirs() - Add automated COCO val2017 download/extraction with small-subset option so the notebook runs end-to-end without manual dataset setup or large downloads Fixes JdeRobot#612
9b920e6 to
b8e94ff
Compare
|
Thanks for the review @dpascualhe . Cleaned up the duplicate imports and moved the new ones into the first cell. Let me know if anything else needs adjusting — happy to help with more issues if there are any you'd point me toward. |
|
Hi @dpascualhe, just following up on this PR. I addressed the requested changes by removing the duplicate imports and moving the new imports into the first cell for consistency. I also noticed the PR now has merge conflicts with the base branch. If you'd prefer, I can rebase and resolve the conflicts as well. I'd appreciate another review whenever you have time. Thanks! |
|
Hi @ashishsoni-ai ! Thanks for addressing the changes, the new downloading logic is working perfectly fine. As you said, there are some conflicts now, can you resolve those? Besides, the cell that Run evaluation on a subset of the dataset can be simplified now, as you are already defining the size of the subset in the first cell and could use directly the |
…ows-coco-setup Only conflict was examples/tutorial_image_detection.ipynb metadata: kept upstream/master's kernelspec (python3 / Python 3 (ipykernel)) and language_info version, dropping the branch's local 'perceptionmetrics' kernel metadata. All other notebook changes merged cleanly.
Run evaluation directly on the dataset object instead of building and swapping in a small_dataset slice: the dataset size is already controlled by USE_SMALL_SUBSET / SUBSET_SIZE in the download cell, so the temporary swap and its restore logic are no longer needed (addresses review feedback on JdeRobot#613).
|
Hi @dpascualhe, both points are addressed and pushed:
The PR is conflict-free now. I'll refresh the stored notebook outputs (they still show the old 5-image evaluation) in a moment — after that we should be ready to merge. Thanks for the review! |
What
Fixes
tutorial_image_detection.ipynbso it runs end-to-end on Windows without manual intervention.Why
!mkdir -pfails on Windows (cmd.exedoesn't support the-pflag), throwing aSyntaxError<PATH_TO_COCO_VAL2017_IMAGES>) with no download guidance, blocking new contributors from running the notebook at allChanges
!mkdir -pcalls with cross-platformos.makedirs(..., exist_ok=True)Testing
Ran the full notebook end-to-end on Windows 11 (Python 3.11, PyTorch 2.4.1 CPU) — all cells execute successfully, including model inference, evaluation metrics, and the precision-recall curve output.
Fixes #612