Skip to content

Refactor nlp_engine_provider.py to improve configuration handling and… #1559

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ShakutaiGit
Copy link
Collaborator

@ShakutaiGit ShakutaiGit commented Mar 25, 2025

Error Reporting #1556

In this update, we have:

  • Introduced stricter file-not-found handling. If a user-supplied configuration file is missing, a FileNotFoundError is raised rather than silently defaulting.
  • For the default configuration file (default.yaml), if it’s missing we now log a warning and fall back to an internal built-in default.

Change Description

Describe your changes here, for example:

  • Updated _read_nlp_conf to raise an exception when a user-provided config file does not exist.
  • Catch FileNotFoundError for the default config file and use a built-in configuration if it’s missing.
  • Added or updated unit tests to ensure correct behavior for user-provided vs. default config files.

Issue Reference

This PR fixes issue #XX

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates/additions if required

@ShakutaiGit ShakutaiGit self-assigned this Mar 25, 2025
@ShakutaiGit ShakutaiGit marked this pull request as ready for review March 30, 2025 09:07
@SharonHart
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ShakutaiGit
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@omri374 omri374 left a comment

Choose a reason for hiding this comment

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

just realized I didn't publish my review

@ShakutaiGit
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

SharonHart
SharonHart previously approved these changes Apr 22, 2025
@ShakutaiGit
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ShakutaiGit
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ShakutaiGit
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@microsoft microsoft deleted a comment from azure-pipelines bot Apr 27, 2025
@microsoft microsoft deleted a comment from azure-pipelines bot Apr 27, 2025
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