Python: Fix notebooks 10 and 11#3557
Conversation
|
Hi @john0isaac, thank you for your help with this. We've had a lot of (breaking) changes over the last few weeks/months after this PR was created. There have been updates on these notebooks since then and I believe they're working fine. If you have time, could you verify, please? |
|
@moonbox3 Thank you for checking this PR. But the main problem still exists in these notebooks Running code that calls hugging face modules, openai modules, and azure openai modules in the same cells gives you errors: The main feature that this PR adds which has not been fixed in other PRs is a variable at the beginning of the notebook to choose between (openai, azure, hugging face) I will fix the merge conflicts one last time if you approve of the idea you can merge it, if not please close this PR. |
7beb718 to
f337261
Compare
…semantic-kernel into fix-python-notebooks
|
Another thing I noticed It was replaced by Also HuggingFace import needs packages |
|
@moonbox3 Done ✅. |
moonbox3
left a comment
There was a problem hiding this comment.
LGTM but two small changes requested, please. Thank you!
juliomenendez
left a comment
There was a problem hiding this comment.
Would it make sense to refactor the Service enum to a module that can be used by all the notebooks instead of repeated in each of them? I see this being used not just in those 2 notebooks in the future.
Otherwise, LGTM
|
@juliomenendez I believe you are correct, at the time I submitted the PR this issue was only present in the last two notebooks. |
|
@john0isaac it just needs a quick |
|
@moonbox3 Done ✅ |
|
We should file an issue to update the other notebooks from using the bool to determine which service to use to this new service enum you've added. |
### Motivation and Context fix: microsoft#3514, I didn't know which integration tests @markwallace-microsoft is referring to but I fixed both notebooks by introducing a check before running the code that users have to define at the beginning of the notebook. ### Description Whichever service the user chooses (OpenAI - Azure OpenAI - Huggine Face) the code adjusts accordingly without the need to change anything later other than the .env file (obviously) and the Service name at the second cell of the two notebooks.

Motivation and Context
fix: #3514, fixed both notebooks by introducing a check before running the code that users have to define at the beginning of the notebook.
Description
Whichever service the user chooses (OpenAI - Azure OpenAI - Huggine Face) the code adjusts accordingly without the need to change anything later other than the .env file (obviously) and the Service name at the second cell of the two notebooks.