Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Conversation

anmarques
Copy link
Member

The pycocotools pathway for model validation expects a "Path" object for the data['path'] entry. When the user provides a complete path to a yaml file (or when --dataset-path is provided) this entry remains a string, which leads to an error when doing the pycocotools evaluation.

This is a failure on ultralytics side, but we can fix in the integration since we override the validator class.

Testing plan: The fix allowed me to use "dataset-path" as below:
sparseml.ultralytics.val
--model zoo:cv/detection/yolov8-n/pytorch/ultralytics/coco/base-none
--data coco.yaml
--dataset-path /home/alexandre/datasets/coco

(dataset-path is implemented by 1. copying ultralytics' coco.yaml to the local path, 2. overwriting the dataset path in the yaml file, 3. replacing the data argument with the complete path to edited yaml file.)

@anmarques anmarques requested a review from dbogunowicz April 20, 2023 18:20
dbogunowicz
dbogunowicz previously approved these changes Apr 20, 2023
@anmarques anmarques merged commit ad82f3b into main Apr 20, 2023
@anmarques anmarques deleted the fix/yolov8/data_path branch April 20, 2023 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants