mirror of
https://github.com/KohakuBlueleaf/KohakuHub.git
synced 2026-07-16 02:33:10 -05:00
[GH-ISSUE #4] [Bug]: commit OIDs too long for huggingface hub compatibility #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LenDigLearn on GitHub (Nov 12, 2025).
Original GitHub issue: https://github.com/KohakuBlueleaf/KohakuHub/issues/4
What's wrong?
I tried to upload a dataset to KohakuHub as follows:
Environment variables for endpoint and token were of course set correctly.
When running above code, I get the following error:
I checked manually, the commit ID returned from KohakuHub is 64 characters, so re.fullmatch fails since it is too long.
Looking at the code, it seems right now the commit IDs generated by LakeFS are directly used. I think either some mapping or truncation of commit IDs would be required to make it fully compatible.
Environment
Logs (if available)
Checklist
@LenDigLearn commented on GitHub (Nov 12, 2025):
HF Hub expects git-style commit IDs (SHA-1), LakeFS uses SHA-256.
A quick and dirty way would be to truncate the returned hash here:
0d3167ed94/src/kohakuhub/api/repo/routers/info.py (L238)I tried this locally and it seems to work.