SynapseML icon indicating copy to clipboard operation
SynapseML copied to clipboard

fix: Add null-safety checks in OpenAIEmbedding transform method

Open smamindl opened this issue 4 days ago • 4 comments

Related Issues/PRs

Related to : 2444

#xxx

What changes are proposed in this pull request?

This PR adds null-safety checks to the transform method in OpenAIEmbedding to handle cases where the OpenAI API response may contain null data.

How is this patch tested?

  • [ ] I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • [ ] No. You can skip this section.
  • [ ] Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • [ ] No. You can skip this section.
  • [ ] Yes. Make sure you have added samples following below steps.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder. Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

smamindl avatar Dec 09 '25 22:12 smamindl