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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe worth adding a comment here providing some background on this - That the env var is for the
transformers
package to look up. And required becauseimportlib.metadata.version("tensorflow")
doesn't work (raises PackageNotFoundError) for our custom version of tensorflow that ships in the containerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I mentioned this, I realised that checking if this also applies in the image where we're getting tensorflow from might be worthwhile. (
nvcr.io/nvidia/tensorflow:22.08-tf2-py3
). The metadata version import works there. And this is because the dist-info directory for tensorflow is present in the dist-packages directory there.An alternative (or additional change to this env var) could be to copy over the dist-info directory along with the package perhaps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened a PR here to add dist-info #704