Skip to content

Commit

Permalink
add replica
Browse files Browse the repository at this point in the history
  • Loading branch information
sakoush committed Jul 24, 2023
1 parent b400ae3 commit accf70e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/k6/components/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ function inferBatchSize() {
return [1]
}

function modelReplicas() {
if (__ENV.MODEL_NUM_REPLICAS) {
return __ENV.MODEL_NUM_REPLICAS.split(",").map( s => parseInt(s))
}
return [1]
}

function modelStartIdx() {
if (__ENV.MODEL_START_IDX) {
return parseInt(__ENV.MODEL_START_IDX)
Expand Down Expand Up @@ -217,5 +224,6 @@ export function getConfig() {
"doWarmup": doWarmup(),
"requestRate": requestRate(),
"constantRateDurationSeconds": constantRateDurationSeconds(),
"modelReplicas": modelReplicas(),
}
}
2 changes: 1 addition & 1 deletion tests/k6/components/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function setupBase(config ) {
for (let j = 0; j < config.maxNumModels.length; j++) {
for (let i = 0; i < config.maxNumModels[j]; i++) {
const modelName = config.modelNamePrefix[j] + i.toString()
const model = generateModel(config.modelType[j], modelName, 1, 1, config.isSchedulerProxy, config.modelMemoryBytes[j], config.inferBatchSize[j])
const model = generateModel(config.modelType[j], modelName, 1, config.modelReplicas[j], config.isSchedulerProxy, config.modelMemoryBytes[j], config.inferBatchSize[j])
const modelDefn = model.modelDefn
const pipelineDefn = model.pipelineDefn

Expand Down

0 comments on commit accf70e

Please sign in to comment.