Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: OpenAI Prompt Template support #1843

Merged
merged 22 commits into from
Feb 24, 2023
Merged

Conversation

eisber
Copy link
Collaborator

@eisber eisber commented Feb 21, 2023

What changes are proposed in this pull request?

Simplifies OpenAI Prompt engineering using PEP3101 string interpolation + output parsing.

How is this patch tested?

Unit tests.

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

Not yet, in the works ;)

@eisber eisber requested a review from mhamilton723 as a code owner February 21, 2023 17:26
@github-actions
Copy link

Hey @eisber 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@eisber
Copy link
Collaborator Author

eisber commented Feb 21, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 21, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 21, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2023

Codecov Report

Merging #1843 (304cb7f) into master (fbbb433) will decrease coverage by 1.22%.
The diff coverage is 57.64%.

@@            Coverage Diff             @@
##           master    #1843      +/-   ##
==========================================
- Coverage   86.84%   85.63%   -1.22%     
==========================================
  Files         297      299       +2     
  Lines       15422    15507      +85     
  Branches      784      783       -1     
==========================================
- Hits        13394    13280     -114     
- Misses       2028     2227     +199     
Impacted Files Coverage Δ
...ure/synapse/ml/cognitive/openai/OpenAIPrompt.scala 30.00% <30.00%> (ø)
...rosoft/azure/synapse/ml/core/spark/Functions.scala 97.14% <97.14%> (ø)
...ft/azure/synapse/ml/causal/DoubleMLEstimator.scala 8.53% <0.00%> (-82.93%) ⬇️
.../azure/synapse/ml/causal/ResidualTransformer.scala 24.32% <0.00%> (-64.87%) ⬇️
.../synapse/ml/cognitive/openai/OpenAIEmbedding.scala 42.10% <0.00%> (-42.11%) ⬇️
...synapse/ml/cognitive/openai/OpenAICompletion.scala 29.41% <0.00%> (-35.30%) ⬇️
...oft/azure/synapse/ml/cognitive/openai/OpenAI.scala 53.19% <0.00%> (-26.96%) ⬇️
...osoft/azure/synapse/ml/causal/DoubleMLParams.scala 71.05% <0.00%> (-26.32%) ⬇️
...crosoft/azure/synapse/ml/io/http/HTTPClients.scala 77.94% <0.00%> (-4.42%) ⬇️
...oft/azure/synapse/ml/param/UntypedArrayParam.scala 53.12% <0.00%> (-3.13%) ⬇️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@eisber
Copy link
Collaborator Author

eisber commented Feb 21, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 22, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 22, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 23, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 23, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 24, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@eisber
Copy link
Collaborator Author

eisber commented Feb 24, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mhamilton723
Copy link
Collaborator

Lovely work! Thanks for the iterations!

@eisber eisber merged commit 48f9c4c into microsoft:master Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants