Refactor nlp_engine_provider.py to improve configuration handling and…
Error Reporting #1556
In this update, we have:
- Introduced stricter file-not-found handling. If a user-supplied configuration file is missing, a
FileNotFoundErroris 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_confto raise an exception when a user-provided config file does not exist. - Catch
FileNotFoundErrorfor 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
- [x] I have reviewed the contribution guidelines
- [x] I have signed the CLA (if required)
- [x] My code includes unit tests
- [x] All unit tests and lint checks pass locally
- [x] My PR contains documentation updates/additions if required
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@omri374
Should i close this PR ? as other PRS cover some parts of it ?
@omri374 @SharonHart Most of the content of this PR was included in other PRS. Closing it.