Skip to content

Show dataset item counts in training config#888

Open
Auryg wants to merge 1 commit into
ostris:mainfrom
Auryg:main
Open

Show dataset item counts in training config#888
Auryg wants to merge 1 commit into
ostris:mainfrom
Auryg:main

Conversation

@Auryg

@Auryg Auryg commented Jun 16, 2026

Copy link
Copy Markdown

Description

Adds dataset item counts to each dataset card in the training configuration page for easier dataset balancing. Dataset heads now show counts like:

Dataset 1 - 150 items

The count includes the media types already used (images, videos, audio).

Implementation

The existing recursive dataset item scanning logic was separated out so it wouldn't need to be duplicated.
Updated the dataset browser 'listImages' to reuse that shared helper.
Added /api/datasets/countItems that returns counts for selected dataset paths.
Added the client hook to fetch counts

Note: I didn't use the already existing /api/datasets/listImages because that returns every item path, and we only needed a count. I tried to keep this lightweight.

Testing

Build and ran successfully

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.

1 participant