Skip to content
Closed
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: 1 addition & 1 deletion dataflow/run-inference/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apache-beam[gcp]==2.49.0
torch==2.2.2
torch==2.8.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Upgrading torch to 2.8.0 while keeping apache-beam at 2.49.0 introduces a high risk of compatibility issues.\n\n1. Breaking Change in torch.load: Starting with PyTorch 2.4, torch.load defaults to weights_only=True. The version of apache-beam used here (2.49.0) does not expose the weights_only parameter in PytorchModelHandlerTensor, which may cause the pipeline to fail if the model's state dict contains non-tensor objects.\n2. Dependency Conflicts: There is a significant age gap between these versions, which often leads to conflicts in shared dependencies like numpy or protobuf.\n\nTo ensure stability, it is strongly recommended to upgrade apache-beam to a more recent version (e.g., 2.60.0 or later) and transformers to a version compatible with PyTorch 2.8.0.

transformers==4.38.0