Skip to content

fix: truncate multifolder detection input ID to comply with 48-char limit#154

Open
Alfrick wants to merge 1 commit intoClarifai:mainfrom
Alfrick:fix/multifolder-detection-input-id-length
Open

fix: truncate multifolder detection input ID to comply with 48-char limit#154
Alfrick wants to merge 1 commit intoClarifai:mainfrom
Alfrick:fix/multifolder-detection-input-id-length

Conversation

@Alfrick
Copy link
Copy Markdown

@Alfrick Alfrick commented Apr 28, 2026

Summary

  • The MultiFolderDetectionDataLoader generates input IDs from image filenames (32-char MD5 hashes)
  • The Clarifai SDK prepends <dataset_id>- to each input ID before uploading, pushing the total length beyond the 48-character API limit
  • All 15 inputs were failing with INPUT_INVALID_REQUEST: id must be between 1 and 48 characters long
  • Fix: truncate id_str to 16 characters, keeping the final ID well within the 48-char limit for any reasonable dataset ID name

Test plan

  • Run dataset upload with a dataset ID of any typical length (e.g. detection_dataset)
  • Confirm all inputs upload successfully with no INPUT_INVALID_REQUEST errors
  • Verify the upload summary shows 100% inputs and annotations progress

🤖 Generated with Claude Code

…limit

The SDK prepends '<dataset_id>-' to the input ID, so long MD5 filenames
caused all uploads to fail with INPUT_INVALID_REQUEST. Truncating id_str
to 16 characters keeps the full ID well within the 48-character limit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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