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
945a5729
Unverified
Commit
945a5729
authored
Sep 02, 2025
by
Tzu-Ling Kan
Committed by
GitHub
Sep 02, 2025
Browse files
fix: Remove duplicate import and make logger global. (#2817)
Signed-off-by:
tzulingk@nvidia.com
<
tzulingk@nvidia.com
>
parent
a6e1d5fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
tests/utils/deployment_graph.py
tests/utils/deployment_graph.py
+8
-3
tests/utils/engine_process.py
tests/utils/engine_process.py
+0
-1
No files found.
tests/utils/deployment_graph.py
View file @
945a5729
...
@@ -13,9 +13,13 @@
...
@@ -13,9 +13,13 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
logging
import
re
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
from
typing
import
Any
,
Dict
,
List
,
Optional
from
typing
import
Any
,
Dict
,
List
,
Optional
logger
=
logging
.
getLogger
(
__name__
)
@
dataclass
@
dataclass
class
Payload
:
class
Payload
:
...
@@ -92,10 +96,11 @@ def completions_response_handler(response):
...
@@ -92,10 +96,11 @@ def completions_response_handler(response):
def
metrics_handler
(
response
):
def
metrics_handler
(
response
):
"""Handler to check if metrics endpoint is working and contains model label."""
"""Handler to check if metrics endpoint is working and contains model label."""
import
logging
if
response
.
status_code
!=
200
:
import
re
raise
AssertionError
(
f
"Metrics endpoint returned non-200 status code:
{
response
.
status_code
}
"
)
logger
=
logging
.
getLogger
(
__name__
)
metrics_text
=
response
.
text
metrics_text
=
response
.
text
# Check for any model label in dynamo_component_requests_total metric
# Check for any model label in dynamo_component_requests_total metric
...
...
tests/utils/engine_process.py
View file @
945a5729
...
@@ -34,7 +34,6 @@ class EngineProcess(ManagedProcess):
...
@@ -34,7 +34,6 @@ class EngineProcess(ManagedProcess):
def
get_metrics
(
self
,
port
=
8081
):
def
get_metrics
(
self
,
port
=
8081
):
"""Curl the metrics endpoint and return the response."""
"""Curl the metrics endpoint and return the response."""
import
requests
metrics_url
=
f
"http://localhost:
{
port
}
/metrics"
metrics_url
=
f
"http://localhost:
{
port
}
/metrics"
logger
.
info
(
f
"Curling metrics endpoint:
{
metrics_url
}
"
)
logger
.
info
(
f
"Curling metrics endpoint:
{
metrics_url
}
"
)
...
...
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