Skip to content

Python: cleanup/sync/fixes (for examples, docs, tests, notebooks) - #317

Merged
Devis Lucato (dluc) merged 12 commits into
microsoft:python-previewfrom
jjhenkel:jjhenkel/minor-fixes-1
Apr 4, 2023
Merged

Devis Lucato (dluc) merged 12 commits into
microsoft:python-previewfrom
jjhenkel:jjhenkel/minor-fixes-1

Conversation

@jjhenkel

Copy link
Copy Markdown

Motivation and Context

The python-preview branch is under active development and many docs/tests/examples are getting a bit out of sync. There are also a few small cleanup chores/refactors to make usage easier (e.g., to make examples cleaner). I've grouped these small fixes (plus a few bug fixes) into this "cleanup" PR.

Description

This PR does the following:

  1. Updates the out-of-date example in README.md
  2. Fixes all 5 of the notebooks we support right now (1,2,3,4, and 6; notebook 5 is planner, I've blanked out most of the code there so we don't confuse people, especially as the planner API is changing)
  3. Fixes a bug w/ stop_sequences in (Azure)OpenAITextCompletion
  4. Fixes a bug introduced in our upgrades to the embeddings cosine-sim check (we should add more thorough tests here)
  5. Cleans up tests
  6. Ensures end-to-end tests are all runnable
  7. Fixes up the kernel_extensions to work more naturally (so that end users can use them directly on the kernel object and get good type-hinting)

Contribution Checklist

I've run make pre-commit, I've run pytest tests/:

image

I've also run each of the tests/end-to-end manually. And the code in the README.py via python3 -m asyncio (to open a REPL) and pasting it in.

@jjhenkel

Copy link
Copy Markdown
Author

Alex Chao (@alexchaomander) this has a lot of fixes that would make first-time use much nicer :) (things like making sure notebooks/docs are runnable and in-sync...) Also a few key bugfixes.

Devis Lucato (@dluc) we should prioritize getting this in. I'll ping a few folks to get reviews

@alexchaomander Alex Chao (alexchaomander) added the python Pull requests for the Python Semantic Kernel label Apr 4, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JTremb

Copy link
Copy Markdown
Contributor

LGTM! tested notebooks -- all working.

Comment thread python/README.md Resolved
Comment thread python/README.md Resolved
Comment thread python/README.md Resolved
Comment thread python/README.md Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dluc
Devis Lucato (dluc) merged commit 53aa101 into microsoft:python-preview Apr 4, 2023
Devis Lucato (dluc) pushed a commit that referenced this pull request Apr 12, 2023
### Motivation and Context

The `python-preview` branch is under active development and many
docs/tests/examples are getting a bit out of sync. There are also a few
small cleanup chores/refactors to make _usage_ easier (e.g., to make
examples cleaner). I've grouped these small fixes (plus a few bug fixes)
into this "cleanup" PR.

### Description

This PR does the following:

1. Updates the out-of-date example in `README.md`
2. Fixes all 5 of the notebooks we support right now (1,2,3,4, and 6;
notebook 5 is planner, I've blanked out most of the code there so we
don't confuse people, especially as the planner API is changing)
3. Fixes a bug w/ `stop_sequences` in `(Azure)OpenAITextCompletion`
4. Fixes a bug introduced in our upgrades to the embeddings cosine-sim
check (we should add more thorough tests here)
5. Cleans up tests
6. Ensures end-to-end tests are all runnable 
7. Fixes up the `kernel_extensions` to work more naturally (so that end
users can use them directly on the `kernel` object and get good
type-hinting)
Devis Lucato (dluc) pushed a commit that referenced this pull request Apr 13, 2023
### Motivation and Context

The `python-preview` branch is under active development and many
docs/tests/examples are getting a bit out of sync. There are also a few
small cleanup chores/refactors to make _usage_ easier (e.g., to make
examples cleaner). I've grouped these small fixes (plus a few bug fixes)
into this "cleanup" PR.

### Description

This PR does the following:

1. Updates the out-of-date example in `README.md`
2. Fixes all 5 of the notebooks we support right now (1,2,3,4, and 6;
notebook 5 is planner, I've blanked out most of the code there so we
don't confuse people, especially as the planner API is changing)
3. Fixes a bug w/ `stop_sequences` in `(Azure)OpenAITextCompletion`
4. Fixes a bug introduced in our upgrades to the embeddings cosine-sim
check (we should add more thorough tests here)
5. Cleans up tests
6. Ensures end-to-end tests are all runnable 
7. Fixes up the `kernel_extensions` to work more naturally (so that end
users can use them directly on the `kernel` object and get good
type-hinting)
Devis Lucato (dluc) pushed a commit that referenced this pull request Apr 13, 2023
### Motivation and Context

The `python-preview` branch is under active development and many
docs/tests/examples are getting a bit out of sync. There are also a few
small cleanup chores/refactors to make _usage_ easier (e.g., to make
examples cleaner). I've grouped these small fixes (plus a few bug fixes)
into this "cleanup" PR.

### Description

This PR does the following:

1. Updates the out-of-date example in `README.md`
2. Fixes all 5 of the notebooks we support right now (1,2,3,4, and 6;
notebook 5 is planner, I've blanked out most of the code there so we
don't confuse people, especially as the planner API is changing)
3. Fixes a bug w/ `stop_sequences` in `(Azure)OpenAITextCompletion`
4. Fixes a bug introduced in our upgrades to the embeddings cosine-sim
check (we should add more thorough tests here)
5. Cleans up tests
6. Ensures end-to-end tests are all runnable 
7. Fixes up the `kernel_extensions` to work more naturally (so that end
users can use them directly on the `kernel` object and get good
type-hinting)
Desmond Howard (dehoward) pushed a commit to lemillermicrosoft/semantic-kernel that referenced this pull request Jun 1, 2023
…crosoft#317)

### Motivation and Context

The `python-preview` branch is under active development and many
docs/tests/examples are getting a bit out of sync. There are also a few
small cleanup chores/refactors to make _usage_ easier (e.g., to make
examples cleaner). I've grouped these small fixes (plus a few bug fixes)
into this "cleanup" PR.

### Description

This PR does the following:

1. Updates the out-of-date example in `README.md`
2. Fixes all 5 of the notebooks we support right now (1,2,3,4, and 6;
notebook 5 is planner, I've blanked out most of the code there so we
don't confuse people, especially as the planner API is changing)
3. Fixes a bug w/ `stop_sequences` in `(Azure)OpenAITextCompletion`
4. Fixes a bug introduced in our upgrades to the embeddings cosine-sim
check (we should add more thorough tests here)
5. Cleans up tests
6. Ensures end-to-end tests are all runnable 
7. Fixes up the `kernel_extensions` to work more naturally (so that end
users can use them directly on the `kernel` object and get good
type-hinting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants