Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/text_to_image/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ ftfy
tensorboard
Jinja2
peft==0.7.0
protobuf>=5.29.6 # not directly required, pinned by Snyk to avoid a vulnerability

Choose a reason for hiding this comment

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

medium

Pinning the protobuf version directly to >5.x can lead to dependency conflicts. tensorboard, a direct dependency in this file, has strict version requirements for protobuf. For instance, tensorboard versions older than 2.17.0 are generally not compatible with protobuf>=5.0. This change will likely force a major version upgrade of tensorboard, which could introduce breaking changes to your project.

A more robust approach is to manage your direct dependencies. Consider pinning tensorboard on line 6 to a version that is compatible with a secure protobuf version (e.g., tensorboard>=2.17.0). This would allow pip to resolve a secure and compatible version of protobuf automatically, making your dependencies more explicit and less brittle.

zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability

Choose a reason for hiding this comment

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

medium

Similar to protobuf, zipp is a transitive dependency. Pinning it directly can make dependency resolution more fragile. It's generally better to manage direct dependencies and let them handle their transitive dependencies. In this case, zipp is required by importlib-metadata, which is used by tensorboard and transformers. Ensuring these direct dependencies are up-to-date is a more robust way to get a secure version of zipp.