@@ -40,19 +40,17 @@ func TestSchedule(t *testing.T) {
40
40
{
41
41
name : "no pods in datastore" ,
42
42
req : & types.LLMRequest {
43
- Model : "any-model" ,
44
- ResolvedTargetModel : "any-model" ,
45
- Critical : true ,
43
+ TargetModel : "any-model" ,
44
+ Critical : true ,
46
45
},
47
46
input : []* backendmetrics.FakePodMetrics {},
48
47
err : true ,
49
48
},
50
49
{
51
50
name : "critical request" ,
52
51
req : & types.LLMRequest {
53
- Model : "critical" ,
54
- ResolvedTargetModel : "critical" ,
55
- Critical : true ,
52
+ TargetModel : "critical" ,
53
+ Critical : true ,
56
54
},
57
55
// pod2 will be picked because it has relatively low queue size, with the requested
58
56
// model being active, and has low KV cache.
@@ -114,9 +112,8 @@ func TestSchedule(t *testing.T) {
114
112
{
115
113
name : "sheddable request, accepted" ,
116
114
req : & types.LLMRequest {
117
- Model : "sheddable" ,
118
- ResolvedTargetModel : "sheddable" ,
119
- Critical : false ,
115
+ TargetModel : "sheddable" ,
116
+ Critical : false ,
120
117
},
121
118
// pod1 will be picked because it has capacity for the sheddable request.
122
119
input : []* backendmetrics.FakePodMetrics {
@@ -177,9 +174,8 @@ func TestSchedule(t *testing.T) {
177
174
{
178
175
name : "sheddable request, dropped" ,
179
176
req : & types.LLMRequest {
180
- Model : "sheddable" ,
181
- ResolvedTargetModel : "sheddable" ,
182
- Critical : false ,
177
+ TargetModel : "sheddable" ,
178
+ Critical : false ,
183
179
},
184
180
// All pods have higher KV cache thant the threshold, so the sheddable request will be
185
181
// dropped.
@@ -356,7 +352,7 @@ func TestSchedulePlugins(t *testing.T) {
356
352
// Initialize the scheduler
357
353
scheduler := NewSchedulerWithConfig (& fakeDataStore {pods : test .input }, & test .config )
358
354
359
- req := & types.LLMRequest {Model : "test-model" }
355
+ req := & types.LLMRequest {TargetModel : "test-model" }
360
356
got , err := scheduler .Schedule (context .Background (), req )
361
357
362
358
// Validate error state
0 commit comments