Unverified Commit fa6feee4 authored by Michael Shin's avatar Michael Shin Committed by GitHub
Browse files

chore: moved asyncio import to top of the file for planner test (#3001)


Signed-off-by: default avatarMichael Shin <michaelshin@users.noreply.github.com>
parent 895fb216
......@@ -9,6 +9,7 @@ testing load prediction, interpolation, or correction factors.
"""
import argparse
import asyncio
import math
import os
......@@ -152,8 +153,6 @@ class TestReplicaCalculation:
planner.decode_interpolator.interpolate_itl.return_value = 10.0
# Run the calculation
import asyncio
asyncio.run(planner.make_adjustments())
# Extract the calculated values from the log calls or by checking the mock calls
......@@ -217,8 +216,6 @@ class TestReplicaCalculation:
planner.decode_interpolator.interpolate_itl.return_value = 10.0
# Run the calculation
import asyncio
asyncio.run(planner.make_adjustments())
# Check the results
......@@ -290,8 +287,6 @@ class TestReplicaCalculation:
planner.connector.reset_mock()
# Run calculation
import asyncio
asyncio.run(planner.make_adjustments())
# Verify results
......@@ -344,8 +339,6 @@ class TestReplicaCalculation:
planner.decode_interpolator.interpolate_itl.return_value = 10.0
# Run calculation
import asyncio
asyncio.run(planner.make_adjustments())
# Verify that total GPU usage doesn't exceed budget
......@@ -401,8 +394,6 @@ class TestReplicaCalculation:
planner.decode_interpolator.interpolate_itl.return_value = 10.0
# Run calculation
import asyncio
asyncio.run(planner.make_adjustments())
# Verify minimum constraints are respected
......@@ -465,8 +456,6 @@ class TestReplicaCalculation:
)
# Run calculation
import asyncio
asyncio.run(planner.make_adjustments())
# Verify that correction factor was effectively clamped
......@@ -526,8 +515,6 @@ class TestReplicaCalculation:
planner.decode_interpolator.interpolate_itl.return_value = 10.0
# Run calculation
import asyncio
asyncio.run(planner.make_adjustments())
# Should handle gracefully without crashing
......@@ -590,8 +577,6 @@ class TestReplicaCalculation:
) # 4 GPUs per engine
# Run calculation
import asyncio
asyncio.run(planner.make_adjustments())
if planner.connector.set_component_replicas.called:
......@@ -649,8 +634,6 @@ class TestReplicaCalculation:
planner.decode_interpolator.interpolate_itl.return_value = 10.0
# Run calculation
import asyncio
asyncio.run(planner.make_adjustments())
if planner.connector.set_component_replicas.called:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment