Skip to content

fix(core): resolve the transformers version alias in ImageRetriever HF URIs - #6445

Open
AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/image-retriever-hf-version-alias
Open

AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/image-retriever-hf-version-alias

Conversation

@AkshayShah03

Copy link
Copy Markdown

Issue #, if available: N/A (follow-up to #5722)

Description of changes:

#5722 fixed image_uris.retrieve to build the HuggingFace image tag from the resolved transformers version, using _version_for_config(version, config) instead of the raw input. The same logic is duplicated in ImageRetriever.retrieve_hugging_face_uri, which ImageRetriever.retrieve("huggingface", ...) calls, and that copy still used original_version:

  • the alias version="4.26" produced the non-existent tag ...-transformers4.26-gpu-... instead of ...-transformers4.26.0-gpu-...;
  • with version omitted, so it's auto-selected, the tag contained the literal transformersNone.

This change applies the same fix to ImageRetriever.

Testing:

  • New tests: ImageRetriever returns the same URI as image_uris.retrieve for an alias version, and an omitted version doesn't produce transformersNone. Both fail before this change.
  • test_image_retriever.py and tests/unit/image_uris: 288 passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…F URIs

aws#5722 fixed image_uris.retrieve to build the HuggingFace image tag from the
resolved transformers version (_version_for_config) instead of the raw
user input, but the duplicate logic in
ImageRetriever.retrieve_hugging_face_uri (reached from
ImageRetriever.retrieve('huggingface', ...)) still used original_version.
So an alias such as version='4.26' produced the non-existent tag
...-transformers4.26-... instead of ...-transformers4.26.0-..., and when
version was omitted (auto-selected) the tag contained 'transformersNone'.

Apply the same fix to ImageRetriever.

This branch is waiting to be deployed

1 waiting deployment
manual-approval — 1511cb9a Waiting Oct 12, 2026 by AkshayShah03 via wait-for-approval #630
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