Skip to content

fix: parallel_download_decorator compatible with transformers >= 5#176

Merged
wejoncy merged 1 commit intomainfrom
fix/parallel-download-compat
Mar 21, 2026
Merged

fix: parallel_download_decorator compatible with transformers >= 5#176
wejoncy merged 1 commit intomainfrom
fix/parallel-download-compat

Conversation

@wejoncy
Copy link
Copy Markdown
Owner

@wejoncy wejoncy commented Mar 21, 2026

Fix AttributeError: 'str' object has no attribute 'result' when using transformers >= 5.

New versions of transformers changed _get_resolved_checkpoint_files to return strings directly instead of going through cached_file, so the monkey-patched Future wrapper is not always applied. Now handles both Future and str items in result[0].

@wejoncy wejoncy force-pushed the fix/parallel-download-compat branch from 331aaea to 97cf063 Compare March 21, 2026 08:05
@wejoncy wejoncy force-pushed the fix/parallel-download-compat branch from 97cf063 to 613c337 Compare March 21, 2026 08:11
@wejoncy wejoncy merged commit 5f8e1a4 into main Mar 21, 2026
2 checks passed
@wejoncy wejoncy deleted the fix/parallel-download-compat branch March 21, 2026 08:14
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