Skip to content

Commit 05d8c15

Browse files
authored
use string when storing lora adapters in simulator (#81)
* use string when storing lora adapters in simulator Signed-off-by: Maya Barnea <mayab@il.ibm.com> * fix typo Signed-off-by: Maya Barnea <mayab@il.ibm.com> --------- Signed-off-by: Maya Barnea <mayab@il.ibm.com>
1 parent 2adff39 commit 05d8c15

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/llm-d-inference-sim/lora.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ type unloadLoraRequest struct {
3333
}
3434

3535
func (s *VllmSimulator) getLoras() []string {
36-
3736
loras := make([]string, 0)
3837

3938
s.loraAdaptors.Range(func(key, _ any) bool {
4039
if lora, ok := key.(string); ok {
4140
loras = append(loras, lora)
41+
} else {
42+
s.logger.Info("Stored LoRA is not a string", "value", key)
4243
}
4344
return true
4445
})

pkg/llm-d-inference-sim/simulator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (s *VllmSimulator) parseCommandParamsAndLoadConfig() error {
190190
s.config = config
191191

192192
for _, lora := range config.LoraModules {
193-
s.loraAdaptors.Store(lora, "")
193+
s.loraAdaptors.Store(lora.Name, "")
194194
}
195195

196196
initRandom(s.config.Seed)

0 commit comments

Comments
 (0)