Skip to content

Add project dataset health check#472

Merged
sergii-bond merged 4 commits intomainfrom
sb/dataset-health
May 7, 2026
Merged

Add project dataset health check#472
sergii-bond merged 4 commits intomainfrom
sb/dataset-health

Conversation

@sergii-bond
Copy link
Copy Markdown
Contributor

@sergii-bond sergii-bond commented May 6, 2026

What does this PR do?

Exposes dataset health check seen in UI to SDK and CLI.

roboflow project health [-r] <project_slug>

options: -r: regenerate

Type of Change

  • New feature (non-breaking change that adds functionality)

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Test details:

export ROBOFLOW_MCP_URL=http://localhost:8000/mcp
export ROBOFLOW_API_KEY=...
export API_URL=https://localapi.roboflow.one
export APP_URL=https://localapp.roboflow.one
export REQUESTS_CA_BUNDLE="$(mkcert -CAROOT)/rootCA.pem"
export RF_WORKSPACE=sergiistaging

roboflow project health bagatelle-staging

{
  "generated": 1778159771149,
  "version": 3,
  "stats": {
    "annotated": 897,
    "unannotated": 0,
    "empty": 0,
    "labels": 23957,
    "images": 897,
    "average": "26.7",
    "singleClass": 0,
    "multiClass": 0,
    "numClasses": 9,
    "classes": [
      {
        "count": 7827,
        "percent": "100.0",
        "cls": "fair",
        "description": "",
        "name": "ball"
      },
      {
        "count": 4473,
        "percent": "57.1",
        "cls": "fair",
        "description": "",
        "name": "100"
      },
      {
        "count": 2690,
        "percent": "34.4",
        "cls": "fair",
        "description": "",
        "name": "40"
      },
      {
        "count": 1794,
        "percent": "22.9",
        "cls": "under",
        "description": "Under Represented",
        "name": "30"
      },
      {
        "count": 1794,
        "percent": "22.9",
        "cls": "under",
        "description": "Under Represented",
        "name": "50"
      },
      {
        "count": 1794,
        "percent": "22.9",
        "cls": "under",
        "description": "Under Represented",
        "name": "70"
      },
      {
        "count": 1792,
        "percent": "22.9",
        "cls": "under",
        "description": "Under Represented",
        "name": "The following pre-processing was applied to each image:"
      },
      {
        "count": 897,
        "percent": "11.5",
        "cls": "under",
        "description": "Under Represented",
        "name": "500"
      },
      {
        "count": 896,
        "percent": "11.4",
        "cls": "under",
        "description": "Under Represented",
        "name": "20"
      }
    ],
    "classesBySplit": {
      "train": [
        {
          "count": 5455,
          "percent": "100.0",
          "cls": "fair",
          "description": "",
          "name": "ball"
        },
        {
          "count": 3127,
          "percent": "57.3",
          "cls": "fair",
          "description": "",
          "name": "100"
        },
        {
          "count": 1880,
          "percent": "34.5",
          "cls": "fair",
          "description": "",
          "name": "40"
        },
        {
          "count": 1254,
          "percent": "23.0",
          "cls": "under",
          "description": "Under Represented",
          "name": "30"
        },
        {
          "count": 1254,
          "percent": "23.0",
          "cls": "under",
          "description": "Under Represented",
          "name": "50"
        },
        {
          "count": 1254,
          "percent": "23.0",
          "cls": "under",
          "description": "Under Represented",
          "name": "70"
        },
        {
          "count": 1252,
          "percent": "23.0",
          "cls": "under",
          "description": "Under Represented",
          "name": "The following pre-processing was applied to each image:"
        },
        {
          "count": 627,
          "percent": "11.5",
          "cls": "under",
          "description": "Under Represented",
          "name": "500"
        },
        {
          "count": 626,
          "percent": "11.5",
          "cls": "under",
          "description": "Under Represented",
          "name": "20"
        }
      ],
      "valid": [
        {
          "count": 1574,
          "percent": "100.0",
          "cls": "fair",
          "description": "",
          "name": "ball"
        },
        {
          "count": 899,
          "percent": "57.1",
          "cls": "fair",
          "description": "",
          "name": "100"
        },
        {
          "count": 540,
          "percent": "34.3",
          "cls": "fair",
          "description": "",
          "name": "40"
        },
        {
          "count": 360,
          "percent": "22.9",
          "cls": "under",
          "description": "Under Represented",
          "name": "30"
        },
        {
          "count": 360,
          "percent": "22.9",
          "cls": "under",
          "description": "Under Represented",
          "name": "50"
        },
        {
          "count": 360,
          "percent": "22.9",
          "cls": "under",
          "description": "Under Represented",
          "name": "70"
        },
        {
          "count": 360,
          "percent": "22.9",
          "cls": "under",
          "description": "Under Represented",
          "name": "The following pre-processing was applied to each image:"
        },
        {
          "count": 180,
          "percent": "11.4",
          "cls": "under",
          "description": "Under Represented",
          "name": "500"
        },
        {
          "count": 180,
          "percent": "11.4",
          "cls": "under",
          "description": "Under Represented",
          "name": "20"
        }
      ],
      "test": [
        {
          "count": 798,
          "percent": "100.0",
          "cls": "fair",
          "description": "",
          "name": "ball"
        },
        {
          "count": 447,
          "percent": "56.0",
          "cls": "fair",
          "description": "",
          "name": "100"
        },
        {
          "count": 270,
          "percent": "33.8",
          "cls": "fair",
          "description": "",
          "name": "40"
        },
        {
          "count": 180,
          "percent": "22.6",
          "cls": "under",
          "description": "Under Represented",
          "name": "30"
        },
        {
          "count": 180,
          "percent": "22.6",
          "cls": "under",
          "description": "Under Represented",
          "name": "50"
        },
        {
          "count": 180,
          "percent": "22.6",
          "cls": "under",
          "description": "Under Represented",
          "name": "70"
        },
        {
          "count": 180,
          "percent": "22.6",
          "cls": "under",
          "description": "Under Represented",
          "name": "The following pre-processing was applied to each image:"
        },
        {
          "count": 90,
          "percent": "11.3",
          "cls": "under",
          "description": "Under Represented",
          "name": "500"
        },
        {
          "count": 90,
          "percent": "11.3",
          "cls": "under",
          "description": "Under Represented",
          "name": "20"
        }
      ]
    },
    "histogram": {
      "20": {
        "1": 896
      },
      "30": {
        "2": 897
      },
      "40": {
        "2": 1,
        "3": 896
      },
      "50": {
        "2": 897
      },
      "70": {
        "2": 897
      },
      "100": {
        "4": 12,
        "5": 885
      },
      "500": {
        "1": 897
      },
      "all": {
        "17": 4,
        "18": 61,
        "19": 13,
        "20": 6,
        "21": 8,
        "22": 4,
        "23": 115,
        "24": 4,
        "25": 3,
        "26": 9,
        "27": 52,
        "28": 209,
        "29": 408,
        "30": 1
      },
      "The following pre-processing was applied to each image:": {
        "1": 2,
        "2": 895
      },
      "ball": {
        "1": 14,
        "2": 4,
        "3": 8,
        "4": 3,
        "5": 117,
        "6": 4,
        "7": 4,
        "8": 9,
        "9": 51,
        "10": 209,
        "11": 409,
        "12": 1
      }
    }
  }
}

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

@sergii-bond sergii-bond marked this pull request as ready for review May 7, 2026 13:51
@sergii-bond sergii-bond requested a review from tonylampada May 7, 2026 13:51
Comment thread roboflow/core/project.py Outdated
if regenerate:
url += "&regenerate=true"

response = requests.get(url)
Copy link
Copy Markdown
Collaborator

@tonylampada tonylampada May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't bypass the adapter. use rfapi.py to make the request - only that file should be allowed to have knowledge of roboflow api endpoints

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@sergii-bond sergii-bond requested a review from tonylampada May 7, 2026 15:29
@sergii-bond sergii-bond merged commit 61b5aa0 into main May 7, 2026
13 checks passed
@digaobarbosa digaobarbosa mentioned this pull request May 7, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants