jrmccluskey commented on code in PR #35677:
URL: https://github.com/apache/beam/pull/35677#discussion_r2325315997


##########
sdks/python/apache_beam/ml/transforms/embeddings/vertex_ai.py:
##########
@@ -281,3 +297,212 @@ def get_ptransform_for_processing(self, **kwargs) -> 
beam.PTransform:
     return RunInference(
         model_handler=_ImageEmbeddingHandler(self),
         inference_args=self.inference_args)
+
+
+@dataclass
+class VertexImage:
+  image: Image
+  embedding: Optional[list[float]] = None
+
+
+@dataclass
+class VertexVideo:
+  video: Video
+  config: VideoSegmentConfig
+  embeddings: Optional[list[VideoEmbedding]] = None

Review Comment:
   That field does get used, the list of per-segment embeddings is re-packed in 
this field in the _multimodal_dict_output_fn(). The suggested pattern is what's 
happening here, albeit not handling the wrappers directly in the main request 
call (I'm adjusting this since the whole point of wrapping everything was for 
future configuration flexibility, just got put on the back burner while I tried 
to handle multiple input formats at the same time.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to