[ML] Round value when using max model memory limit (#35223)
* [ML] Round value when using max model memory limit * changing ceil to floor to avoid accidentally exceeding max mml
This commit is contained in:
parent
e05098dd27
commit
c0edcbe9ab
|
@ -105,7 +105,7 @@ export function calculateModelMemoryLimitProvider(callWithRequest) {
|
|||
const maxBytes = numeral(limits.max_model_memory_limit.toUpperCase()).value();
|
||||
const mmlBytes = numeral(`${mmlMB}MB`).value();
|
||||
if (mmlBytes > maxBytes) {
|
||||
mmlMB = (maxBytes / numeral('1MB').value());
|
||||
mmlMB = Math.floor(maxBytes / numeral('1MB').value());
|
||||
}
|
||||
}
|
||||
response({ modelMemoryLimit: `${mmlMB}MB` });
|
||||
|
|
Loading…
Reference in a new issue