Skip to content

Commit 1d65347

Browse files
matthew29tangcopybara-github
authored andcommitted
feat: Install Bigframes torch dependencies automatically
PiperOrigin-RevId: 571139202
1 parent a9350af commit 1d65347

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vertexai/preview/_workflow/serialization_engine/serializers.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1146,8 +1146,9 @@ def serialize(
11461146
detected_framework = kwargs.get("framework")
11471147
BigframeSerializer._metadata.framework = detected_framework
11481148
if detected_framework == "torch":
1149-
self.register_custom_command("pip install torchdata")
1150-
self.register_custom_command("pip install torcharrow")
1149+
# Install using custom_commands to avoid numpy dependency conflict
1150+
BigframeSerializer._metadata.custom_commands.append("pip install torchdata")
1151+
BigframeSerializer._metadata.custom_commands.append("pip install torcharrow")
11511152
elif detected_framework == "tensorflow":
11521153
tensorflow_io_dep = "tensorflow-io==" + self._get_tfio_verison()
11531154
BigframeSerializer._metadata.dependencies.append(tensorflow_io_dep)

0 commit comments

Comments
 (0)