**Subject:** Help with OpenAI Embedding Handler Output Type Hint Warning

Hi Danny,

I’m running into a warning related to the `OpenAITextEmbeddings` handler in
Apache Beam and could use your guidance.

Here’s the warning I’m seeing:

```

WARNING:root:This output type hint will be ignored and not used for
type-checking purposes. Typically, output type hints for a PTransform are
single (or nested) types wrapped by a PCollection, PDone, or None. Got:
Union[Tuple[PCollection[~MLTransformOutputT], PCollection[Row]],
PCollection[~MLTransformOutputT]] instead.

```

This shows up multiple times and seems related to how the output type is
declared in the transform.

I’m wondering if this is expected or if the output signature should be
updated to prevent the warning.

Here’s the link to the code I’m working with:

openai
<https://github.com/aditya0yadav/beam-1/blob/master/sdks/python/apache_beam/ml/transforms/embeddings/open_ai.py>


👉
https://github.com/aditya0yadav/beam-1/blob/master/sdks/python/apache_beam/ml/transforms/embeddings/open_ai.py

Would appreciate your thoughts when you get a chance.

Best,

Aditya

>

Reply via email to