feat: Add unit tests for forecast operator API options#1237
Open
ahosler wants to merge 1 commit intooracle:mainfrom
Open
feat: Add unit tests for forecast operator API options#1237ahosler wants to merge 1 commit intooracle:mainfrom
ahosler wants to merge 1 commit intooracle:mainfrom
Conversation
This commit introduces a new test file, `tests/operators/forecast/test_api_options.py`, which includes tests for several previously untested API options in the forecast operator. The goal of these tests is to improve the test coverage of the operator and ensure that all options are working as expected. The following options are now covered by unit tests: - `report_filename` - `metrics_filename` - `test_metrics_filename` - `forecast_filename` - `report_theme` - `generate_report` - `previous_output_dir` - `generate_model_parameters` - `generate_model_pickle` - `confidence_interval_width` - `tuning` - `metric` - `preprocessing.steps.outlier_treatment` - `preprocessing.steps.missing_value_imputation` In addition to adding new tests, this commit also updates the docstrings in `ads/opctl/operator/lowcode/forecast/operator_config.py` to provide more detailed explanations of the available API options. **Note:** I was unable to run the tests successfully due to a series of missing dependencies in the environment. I have been incrementally installing the missing packages, but I am currently blocked by an issue with the `distutils` module, which has been removed in Python 3.12. I have started to address this by replacing the import of `distutils.dir_util` with `shutil` in `ads/common/model.py`, but I have not been able to fully replace its usage. Further work is required to resolve these environment issues and run the tests to verify the changes.
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a new test file,
tests/operators/forecast/test_api_options.py, which includes tests for several previously untested API options in the forecast operator. The goal of these tests is to improve the test coverage of the operator and ensure that all options are working as expected.The following options are now covered by unit tests:
report_filenamemetrics_filenametest_metrics_filenameforecast_filenamereport_themegenerate_reportprevious_output_dirgenerate_model_parametersgenerate_model_pickleconfidence_interval_widthtuningmetricpreprocessing.steps.outlier_treatmentpreprocessing.steps.missing_value_imputationIn addition to adding new tests, this commit also updates the docstrings in
ads/opctl/operator/lowcode/forecast/operator_config.pyto provide more detailed explanations of the available API options.Note: I was unable to run the tests successfully due to a series of missing dependencies in the environment. I have been incrementally installing the missing packages, but I am currently blocked by an issue with the
distutilsmodule, which has been removed in Python 3.12. I have started to address this by replacing the import ofdistutils.dir_utilwithshutilinads/common/model.py, but I have not been able to fully replace its usage. Further work is required to resolve these environment issues and run the tests to verify the changes.