-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[AINode] More accurate exceptions #17061
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
base: master
Are you sure you want to change the base?
Conversation
CRZbulabula
left a comment
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.
LGTM!
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.
Pull request overview
This PR introduces a dedicated AINodeConnectionException to replace generic exception handling when connecting to AINode fails, improving exception clarity and consistency across the codebase. It also adds validation to prevent duplicate device IDs in load/unload model operations.
Changes:
- Created new
AINodeConnectionExceptionclass with a descriptive error message for AINode connection failures - Replaced generic
IoTDBRuntimeExceptionandModelInferenceProcessExceptionwithAINodeConnectionExceptionin multiple AINode client interaction points - Added duplicate device ID validation in Python handler for load/unload model operations with corresponding error codes (1509, 1510)
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
AINodeConnectionException.java |
New exception class for AINode connection failures with standardized error message |
UDTFForecast.java |
Replaced generic exception with AINodeConnectionException in forecast method |
ForecastTableFunction.java |
Replaced generic exception with AINodeConnectionException in forecast method and removed unused import |
ClassifyTableFunction.java |
Replaced generic exception with AINodeConnectionException in classify method and removed unused import |
ClusterConfigTaskExecutor.java |
Replaced generic exceptions with AINodeConnectionException in 8 model management methods |
InferenceOperator.java |
Replaced ModelInferenceProcessException with AINodeConnectionException in inference task submission |
handler.py |
Added duplicate device ID validation for loadModel and unloadModel operations |
constant.py |
Added new error codes LOAD_MODEL_ERROR (1509) and UNLOAD_MODEL_ERROR (1510) |
AINodeInstanceManagementIT.java |
Added integration tests for duplicate device ID validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pr adds more accurate exceptions for AINode.