[ML] Add per allocation and per deployment memory metadata fields to …#6
[ML] Add per allocation and per deployment memory metadata fields to …#6MitchLewis930 wants to merge 1 commit intopr_016_beforefrom
Conversation
…the trained models config (elastic#98139) To improve the required memory estimation of NLP models, this PR introduces two new metadata fields: per_deployment_memory_bytes and per_allocation_memory_bytes. per_deployment_memory_bytes is the memory required to load the model in the deployment per_allocation_memory_bytes is the temporary additional memory used during the inference for every allocation. This PR extends the memory usage estimation logic while ensuring backward compatibility. In a follow-up PR, I will adjust the assignment planner to use the refined memory usage information.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||
User description
PR_016
PR Type
Enhancement
Description
Add per-deployment and per-allocation memory metadata fields to trained models
Extend memory usage estimation logic to use new metadata fields when available
Maintain backward compatibility with models lacking memory metadata
Update all task parameter constructors and serialization to include new fields
Diagram Walkthrough
File Walkthrough
1 files
Register new transport version for memory metadata7 files
Add memory metadata fields to TaskParams classAdd memory metadata fields and version constantUpdate builder to pass memory metadata fieldsUse memory metadata in stats calculationExtract and pass memory metadata from model configPass memory metadata when updating task paramsInclude memory metadata in allocation updates15 files
Update test to include memory metadata parametersUpdate test to include memory metadata parametersAdd integration test for memory estimation with metadataSupport creating models with memory metadata in testsUpdate test to include memory metadata parametersUpdate all test cases with memory metadata fieldsUpdate test cases with memory metadata parametersUpdate test helper to include memory metadataUpdate test to include memory metadata parametersUpdate test helper with memory metadata fieldsUpdate test helpers with memory metadata parametersUpdate test to include memory metadata fieldsUpdate test cases with memory metadata parametersUpdate test cases with memory metadata parametersUpdate test with memory metadata parameters