-
Notifications
You must be signed in to change notification settings - Fork 53
Add troubleshooting guide and enhance error messages for ADS Forecast Operator #1248
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
codeloop
wants to merge
2
commits into
main
Choose a base branch
from
vikaspa/forecast_troubleshoot
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
24 changes: 24 additions & 0 deletions
24
ads/opctl/operator/lowcode/forecast/model/troubleshooting.MD
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ADS Forecast Operator Troubleshooting | ||
|
||
Below is a consolidated catalogue of every error class that can be raised by the ADS Forecast Operator, why it occurs, and how to fix or prevent it. | ||
|
||
| Error / Exception | When & Why it is Raised | How to Resolve / Prevent | | ||
| :--- | :--- | :--- | | ||
| **ForecastSchemaYamlError** | Your `forecast.yaml` is syntactically valid YAML but violates the schema (missing required keys, wrong data-types, invalid enum values, etc.). | • Run `adgits operator verify -f forecast.yaml` to see the exact field that is wrong.<br>• Cross-check against `ads/opctl/operator/lowcode/forecast/schema.yaml` and correct the offending key or value. | | ||
| **ForecastInputDataError** | A required dataset cannot be read or fails validation (e.g. empty file, wrong delimiter, corrupt parquet). | • Ensure the URL / path is correct and accessible (OCI auth for Object Storage, local path otherwise).<br>• Confirm the file format matches the `format:` field. | | ||
| **DataMismatchError** | 1. Historical dataset’s columns do not equal the set of expected columns (`Transformations._check_historical_dataset()`).<br>2. Additional data are not aligned with the historical index or horizon (`ForecastDatasets.AdditionalData`). | • Verify the CSV or DB table has exactly: `target_column`, `datetime_column`, and optional `target_category_columns`.<br>• For additional data, make sure every (Date, Series) that exists in historical data is present, and that it also extends at least `horizon` rows into the future. | | ||
| **InvalidParameterError** | A generic guard around many configuration & ingestion problems. Typical triggers:<br>• `datetime_column.format` does not match the literal dates.<br>• Unsupported `format:` value in an InputData section.<br>• Neither `url` nor `connect_args` provided. | • Supply the correct `strftime` format (`%Y-%m-%d`, `%d/%m/%Y`, …).<br>• Use one of the allowed formats (`csv`, `excel`, `parquet`, etc.).<br>• Provide at least one of `url`, `sql`, or `table_name` when using a database connection. | | ||
| **InsufficientDataError** | The auto-select path cannot create the requested number of back-tests (k-fold) because each fold must have at least `2 × horizon` observations (`ModelEvaluator.generate_cutoffs`). | • Decrease `num_backtests`.<br>• Provide a longer history for the smallest series.<br>• Switch off auto-select and choose a model explicitly. | | ||
| **UnSupportedModelError** | `spec.model` (or the best candidate from auto-select) is not in the factory’s `_MAP`. | • Choose one of the supported values: `prophet`, `arima`, `neuralprophet`, `automlx`, `autots`, or `auto-select`. | | ||
| **ValueError – AUTOMLX explanation mode** | `explanations_accuracy_mode == AUTOMLX` but the selected model is not AutoMLX. | • Set `explanations_accuracy_mode` to `HIGH_ACCURACY`, `BALANCED` or `FAST_APPROXIMATE`, or force the model to `automlx`. | | ||
| **Exception – “Could not determine datetime type … specify format explicitly”** | Datetime parsing failed because the operator could not infer the format. | • Add `datetime_column.format:` in YAML with an explicit strftime string matching the file. | | ||
| **Generic training / prediction exceptions** | Any framework-specific failure that bubbles up during `_build_model()` (e.g. fitting fails due to constant series, convergence failures, memory errors). The operator catches many of these and either:<br>• Records the message in `errors.json` and continues with the remaining series. | • Inspect `errors.json` inside `output_directory` for the real stack trace. | | ||
|
||
--- | ||
|
||
### Quick Triage Checklist | ||
|
||
- Run `ads operator verify -f forecast.yaml` – fixes most schema issues before execution. | ||
- Preview the first few rows of every CSV you reference; check column names. | ||
- Validate your datetime column with `pd.to_datetime(..., format='…')` in a notebook. | ||
- For Forecasting with additional data, make sure every (Date, Series) that exists in historical data is present, and that it also extends at least `horizon` rows into the future. |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it would be better to have such docs in the https://github.com/oracle-samples/oci-data-science-ai-samples repo