-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Adding Python notebook for native function examples #699
Adding Python notebook for native function examples #699
Conversation
…se native functions in python, including examples with context variables
@microsoft-github-policy-service agree |
@microsoft-github-policy-service agree |
Thank you so much for creating this! I was just putting on our backlog the need to have better docs/notebooks for this. I'll review! |
Happy to help out! This project is fascinating, I'm excited to be able to contribute. |
…thin semantic functions. Added some details about the sk_function_context_parameter decorator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Really like this notebook. One change I would make is to rename it as 08-native-function-inline.ipynb
because we will be merging in a 07 hugging face notebook very shortly. #762
Love it ❤️ |
Thank you. Yes, I'm preparing a hackathon and I was spending a lot of time figuring out how to implement native functions. Thanks for the notebook |
@carterwilliamson After talking with the team, could we actually simplify the notebook to just be completely inline? So we can remove the parts about opening an external script and writing code that you would execute inside a main function. Instead, just directly call those functions inside Jupyter! Basically, we want people to be able to do everything they need to do directly in the notebook and not have to bring up some external editor. Let me know if that makes sense! We love the notebook and definitely want to bring this in! |
@carterwilliamson Let me know if you're able to make the changes! Otherwise, I'd be happy to push to this branch with the updates! |
@carterwilliamson Made changes directly to this PR. Kept your examples. Just cleaned up the wording and made it more inline. |
@alexchaomander apologies, I went on vacation and didn't have access to github. Looks like this got completed. Any remaining updates you or the team would like to see here? |
@carterwilliamson Nope! Thank you so much for this PR! Looking forward to your next one :) |
### Motivation and Context This PR is intended to give some functioning examples to help users get started with python native functions. Currently, there are no examples or very limited examples. When I was playing around with this tool I ended up using some of the integration tests as examples to help get started. Hopefully, this will help the next user with the lessons learned. ### Description This adds a jupyter notebook that walks users through using native functions alongside semantic functions to build a simple story writing app. This notebook also shows how to use ContextVariables and run a semantic function from within a native function. Co-authored-by: Carter Williamson <carter.williamson@anitian.com> Co-authored-by: Devis Lucato <devis@microsoft.com> Co-authored-by: Alex Chao <5111035+alexchaomander@users.noreply.github.com>
Motivation and Context
This PR is intended to give some functioning examples to help users get started with python native functions.
Currently, there are no examples or very limited examples. When I was playing around with this tool I ended up using some of the integration tests as examples to help get started. Hopefully, this will help the next user with the lessons learned.
Description
This adds a jupyter notebook that walks users through using native functions alongside semantic functions to build a simple story writing app. This notebook also shows how to use ContextVariables and run a semantic function from within a native function.
Contribution Checklist
dotnet format