Repository navigation
refactor(connectors)!: make the Hugging Face download result a mapping from part to path - #823
Merged
masquare merged 2 commits intoNov 20, 2026
Conversation
masquare
force-pushed
the
refactor/huggingface-convert-files
branch
from
November 19, 2026 17:34
ccc77b7 to
ced7561
Compare
masquare
force-pushed
the
refactor/huggingface-convert-files
branch
from
November 19, 2026 17:42
ced7561 to
704613e
Compare
masquare
force-pushed
the
refactor/huggingface-convert-files
branch
from
November 19, 2026 17:48
704613e to
9b41ca1
Compare
masquare
marked this pull request as ready for review
November 19, 2026 18:54
karhu
approved these changes
Nov 20, 2026
karhu
left a comment
Contributor
There was a problem hiding this comment.
Let's add GH labels, and update the PR description / merge-commit message, otherwise LGTM
masquare
force-pushed
the
refactor/huggingface-convert-files
branch
from
November 20, 2026 07:25
9b41ca1 to
6d6b352
Compare
✅ CI checks passed
Updated for |
…rt to path BaseHuggingFaceConnector implements convert once. It checks the refs and calls convert_files with a mapping from each part name to its local path. A connector reads files["questions"] and no longer calls ref_paths, which is removed.
…ing itself download_async returns the mapping from each part name to its local path, and a connector implements the normal convert(files). HubFileRef, check_refs and convert_files are removed. TimeSeriesExam uses the same form.
masquare
force-pushed
the
refactor/huggingface-convert-files
branch
from
November 20, 2026 15:31
6d6b352 to
79b4915
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Hugging Face connector now gets a mapping from each part name to its local path. The mapping is the download result itself, which the PR below makes possible.
What changes
BaseHuggingFaceConnectoris aBaseConnector[Mapping[str, Path]].downloadreturns the local path of each part inSOURCE_FILES, in the declared order.convert(self, files)and readsfiles["questions"].HubFileRef,check_refsandref_pathsare removed, and so is the rewrite ofconvertin__init_subclass__.The first commit adds an intermediate
convert_filesmethod. The second commit removes it again in favour of the form above.Behaviour change
The base no longer checks the input of
convertfor empty, repeated or undeclared parts.downloadalways returns every declared part, so this affects only tests that build the mapping by hand. A missing part there raises a plainKeyError. TSAQA loses its own check that every split file is present, for the same reason.Checks
make checkandmake test-connectorspass.