Conversation
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.
Problem
The
hf_pretrained_clip_large_inference_on_inf2.ipynbnotebook was failing in CI with two dependency issues:numpy downgrade breaks neuronx-cc: The notebook pinned
numpy==1.26.4, but the test environment runs Python 3.12 whereneuronx-cc 2.0.254643.0a0requiresnumpy>=2.0.0. Installing numpy 1.26.4 caused the Neuron compiler to become incompatible:Unpinned transformers pulled breaking major version: Without a version pin, pip resolved
transformers-5.8.0(a major version jump from the 4.x the notebook was written for), which has breaking API changes for CLIP model outputs.Fix
numpy==1.26.4pin — the pre-installed numpy 2.4.4 in the DLC is compatible with all packages including neuronx-cc.transformers==4.57.6— ensures a compatible 4.x version is used, avoiding breaking changes in transformers 5.x.%env HF_HUB_DISABLE_PROGRESS_BARS=1— suppresses xet progress bar rendering errors during non-interactive notebook execution in CI.return_dict=Truewithoutput_cpu.logits_per_image[0]— the stable, documented API for accessing CLIP similarity logits (traced Neuron model still returns tuples, accessed viaoutput_neuron[0][0]).Test plan