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

Python: Notebook ServiceSettings needs the create method. #7366

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

moonbox3
Copy link
Contributor

Motivation and Context

The notebooks are failing to find the .env file that is located in the same directory. The ServiceSettings class is missing the .create() method on it, to properly configure the settings from the .env file.

Description

Update the call to settings = ServiceSettings.create() so that the service settings are created properly and reference the .env file located in the getting_started directory.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner July 19, 2024 19:31
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Jul 19, 2024
@moonbox3 moonbox3 enabled auto-merge July 19, 2024 19:31
@moonbox3 moonbox3 added this pull request to the merge queue Jul 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 19, 2024
@moonbox3 moonbox3 added this pull request to the merge queue Jul 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 19, 2024
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jul 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 19, 2024
@moonbox3 moonbox3 added this pull request to the merge queue Jul 19, 2024
@markwallace-microsoft
Copy link
Member

Py3.10 Test Coverage

Python 3.10 Test Coverage Report
FileStmtsMissCoverMissing
semantic_kernel
   kernel.py157994%145, 156, 160, 200–201, 310–313, 422
semantic_kernel/connectors
   telemetry.py16288%18–19
semantic_kernel/connectors/ai/azure_ai_inference/services
   azure_ai_inference_chat_completion.py149497%169, 312, 416, 430
semantic_kernel/connectors/ai/embeddings
   embedding_generator_base.py8188%50
semantic_kernel/connectors/ai/hugging_face/services
   hf_text_completion.py54394%95, 103, 134
   hf_text_embedding.py32584%77–81
semantic_kernel/connectors/openapi_plugin
   openapi_manager.py58297%110–111
   openapi_parser.py88199%127
   openapi_runner.py105298%181–182
semantic_kernel/connectors/openapi_plugin/models
   rest_api_operation.py129199%240
semantic_kernel/functions
   kernel_function_decorator.py99199%93
   kernel_function_from_method.py96199%153
   kernel_function_from_prompt.py154795%165–166, 180, 200, 218, 238, 321
   kernel_plugin.py187299%472, 475
semantic_kernel/planners
   plan.py2344581%52, 161–163, 195, 212–225, 262, 267, 275–276, 286–289, 306, 311, 327, 330–335, 353, 358, 361, 363, 370, 384–386, 391–395
semantic_kernel/planners/function_calling_stepwise_planner
   function_calling_stepwise_planner.py116497%143, 187–188, 196
semantic_kernel/planners/sequential_planner
   sequential_planner.py64691%69, 73, 107, 123, 132–133
   sequential_planner_extensions.py50982%29–30, 52, 106–120
   sequential_planner_parser.py771284%64–72, 91, 115–118
semantic_kernel/schema
   kernel_json_schema_builder.py95397%44, 76, 160
semantic_kernel/template_engine/blocks
   code_block.py77199%119
   named_arg_block.py43198%98
TOTAL703612298% 

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1895 1 💤 0 ❌ 0 🔥 31.355s ⏱️

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 19, 2024
@moonbox3 moonbox3 merged commit d8888dc into microsoft:main Jul 22, 2024
25 checks passed
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 2024
…7366)

### Motivation and Context

The notebooks are failing to find the .env file that is located in the
same directory. The ServiceSettings class is missing the `.create()`
method on it, to properly configure the settings from the .env file.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Update the call to `settings = ServiceSettings.create()` so that the
service settings are created properly and reference the .env file
located in the getting_started directory.
- Fixes microsoft#7360 

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
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