Skip to content

Conversation

alvarobartt
Copy link
Contributor

@alvarobartt alvarobartt commented Jun 5, 2025

Description of changes:

This PR adds the Text Embeddings Inference (TEI) 1.7.1 recently released, that comes with some patches that were blocking some AWS SageMaker users as per e.g. huggingface/text-embeddings-inference#596 (comment).

Find the release notes at https://github.com/huggingface/text-embeddings-inference/releases/tag/v1.7.1

Important

This PR also updates the release process for Text Embeddings Inference (TEI) images, since those come with both Python and PyTorch version specifiers, which are misleading and not correct, since the TEI images are Rust-only. In consequence the release_utils.py script has been updated accordingly to remove those values from the TEI URIs, as well as from the releases.json file and made both python_version and pytorch_version configuration values optional as in the cuda_version (which was already optional).

This being said, the changes in this PR may affect other repositories pulling the former URIs, which again are incorrect, so happy to help fix it everywhere when needed to make sure that containers released from now on follow the current URI formatting proposed in this PR, as well as upstreaming the fix to the AWS SageMaker SDK et al.


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

@alvarobartt alvarobartt requested a review from a team as a code owner June 5, 2025 07:12
TEI containers don't have Python, neither PyTorch in consequence, those
are Rust only, so those extra fields are not required and could
potentially be misleading

Also the field `cuda_version` has been removed from one of the CPU
variants, as CPU images don't have CUDA installed
- Assume `python_version` and `pytorch_version` can be `None` i.e.,
Optional, since those are not required for Text Embeddings Inference
(TEI)
- Fix typing accordingly and run `ruff` to ensure code quality
@malav-shastri malav-shastri merged commit 43b36bc into awslabs:main Jun 25, 2025
6 checks passed
LOG.info(f"Going to test built image for config: {config}.")
test_role_arn = os.getenv(EnvironmentVariable.TEST_ROLE_ARN.name)
test_session = aws.get_session_for_role(test_role_arn)
test_session = aws.get_session_for_role(test_role_arn) # type: ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these ignores?

environ = os.environ.copy()
environ.update(
{
{ # type: ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment here

@malav-shastri
Copy link
Member

@alvarobartt curious why are we adding the type: ignore ?

@alvarobartt
Copy link
Contributor Author

@alvarobartt curious why are we adding the type: ignore ?

Hey @malav-shastri so I was adding those as the type checkers were complaining which can sometimes be tedious / annoying, and that's not because the types are incorrect, but rather than the types are arbitrary e.g. the same variable can either be None, str or List[str], which the type checking fails to identify unless it's under an if isinstance(...). So it can be considered a fairly opinionated addition, but I guess that for the sake of clarity on types is nice, happy to remove it if annoying though! 🤗

@alvarobartt
Copy link
Contributor Author

Also @malav-shastri we need to take into consideration the note I included in #153 (comment), since that will affect the image URIs from now on as those won't come with the misleading tags for Python and PyTorch (as per described in the PR description). So flagging it here just in case, and also cc'ing both @arjkesh and @fgbelidji for visibility!

@pagezyhf
Copy link

Hello @malav-shastri, can you let me know when the TEI 1.7.1 images are available in all the public registries so I do a PR to the Python Sagemaker SDK?

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.

3 participants