Skip to content

Commit

Permalink
allow model versions to increase (#6038)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakoush authored Nov 8, 2024
1 parent 0ebbd19 commit 13ad524
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/k6/components/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,12 @@ export function applyModelReplicaChange(config) {
const modelId = Math.floor(Math.random() * config.maxNumModels[j])
const modelName = config.modelNamePrefix[j] + modelId.toString()

let replicas = Math.floor(Math.random() * config.maxModelReplicas[j]) + 1
const model = generateModel(config.modelType[j], modelName, 1, replicas, config.isSchedulerProxy, config.modelMemoryBytes[j], config.inferBatchSize[j])
const rand = Math.random()
const replicas = Math.floor(rand * config.maxModelReplicas[j]) + 1
const memory = (rand > 0.5)? replicas + "k": "1k" // this will induce a change in memory causing a new version of the model to be created
const model = generateModel(config.modelType[j], modelName, 1, replicas, config.isSchedulerProxy, memory, config.inferBatchSize[j])
let opOk = k8s.loadModel(modelName, model.modelCRYaml, true)
console.log("Model load %s with replicas %d operation status:",modelName, replicas, opOk)
console.log("Model load with replicas/memory operation status", modelName, replicas, memory, opOk)
}
}
sleep(config.sleepBetweenModelReplicaChange)
Expand Down

0 comments on commit 13ad524

Please sign in to comment.