Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
7de80960
Unverified
Commit
7de80960
authored
Jan 23, 2026
by
Abhishek Gupta
Committed by
GitHub
Jan 23, 2026
Browse files
feat: add __all__ exports and __repr__ methods for better debugging (#5606)
parent
7361de42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
components/src/dynamo/planner/utils/exceptions.py
components/src/dynamo/planner/utils/exceptions.py
+29
-0
lib/bindings/python/src/dynamo/health_check.py
lib/bindings/python/src/dynamo/health_check.py
+8
-0
No files found.
components/src/dynamo/planner/utils/exceptions.py
View file @
7de80960
...
...
@@ -22,6 +22,21 @@ contextual information to help with debugging and error handling.
from
typing
import
List
__all__
=
[
"PlannerError"
,
"DynamoGraphDeploymentNotFoundError"
,
"ComponentError"
,
"ModelNameNotFoundError"
,
"DeploymentModelNameMismatchError"
,
"UserProvidedModelNameMismatchError"
,
"BackendFrameworkNotFoundError"
,
"BackendFrameworkInvalidError"
,
"SubComponentNotFoundError"
,
"DuplicateSubComponentError"
,
"DeploymentValidationError"
,
"EmptyTargetReplicasError"
,
]
class
PlannerError
(
Exception
):
"""Base exception for all planner-related errors.
...
...
@@ -49,6 +64,9 @@ class DynamoGraphDeploymentNotFoundError(PlannerError):
super
().
__init__
(
message
)
def
__repr__
(
self
)
->
str
:
return
f
"
{
self
.
__class__
.
__name__
}
(deployment_name=
{
self
.
deployment_name
!
r
}
, namespace=
{
self
.
namespace
!
r
}
)"
class
ComponentError
(
PlannerError
):
"""Base class for subComponent configuration issues.
...
...
@@ -79,6 +97,9 @@ class DeploymentModelNameMismatchError(PlannerError):
self
.
message
=
message
super
().
__init__
(
self
.
message
)
def
__repr__
(
self
)
->
str
:
return
f
"
{
self
.
__class__
.
__name__
}
(prefill_model_name=
{
self
.
prefill_model_name
!
r
}
, decode_model_name=
{
self
.
decode_model_name
!
r
}
)"
class
UserProvidedModelNameMismatchError
(
PlannerError
):
"""Raised when the model name is not the same as the user provided model name"""
...
...
@@ -130,6 +151,11 @@ class SubComponentNotFoundError(ComponentError):
super
().
__init__
(
message
)
def
__repr__
(
self
)
->
str
:
return
(
f
"
{
self
.
__class__
.
__name__
}
(sub_component_type=
{
self
.
sub_component_type
!
r
}
)"
)
class
DuplicateSubComponentError
(
ComponentError
):
"""Raised when multiple services have the same subComponentType.
...
...
@@ -150,6 +176,9 @@ class DuplicateSubComponentError(ComponentError):
super
().
__init__
(
message
)
def
__repr__
(
self
)
->
str
:
return
f
"
{
self
.
__class__
.
__name__
}
(sub_component_type=
{
self
.
sub_component_type
!
r
}
, service_names=
{
self
.
service_names
!
r
}
)"
class
DeploymentValidationError
(
PlannerError
):
"""Raised when deployment validation fails for multiple components.
...
...
lib/bindings/python/src/dynamo/health_check.py
View file @
7de80960
...
...
@@ -15,6 +15,8 @@ from typing import Any, Dict, Optional
logger
=
logging
.
getLogger
(
__name__
)
__all__
=
[
"HealthCheckPayload"
,
"load_health_check_from_env"
]
def
load_health_check_from_env
(
env_var
:
str
=
"DYN_HEALTH_CHECK_PAYLOAD"
,
...
...
@@ -94,3 +96,9 @@ class HealthCheckPayload:
# Check for environment override
self
.
_payload
=
load_health_check_from_env
()
or
self
.
default_payload
return
self
.
_payload
def
__repr__
(
self
)
->
str
:
"""Return a string representation of the health check payload."""
class_name
=
self
.
__class__
.
__name__
payload
=
self
.
to_dict
()
return
f
"
{
class_name
}
(payload=
{
payload
!
r
}
)"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment