Skip to content

Commit 9cde160

Browse files
authored
Fix loading of composing models for ensembles (#810)
1 parent 398c688 commit 9cde160

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

model_analyzer/record/metrics_manager.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -430,19 +430,15 @@ def _load_model_variants(self, run_config: RunConfig) -> bool:
430430
"""
431431
Loads all model variants in the client
432432
"""
433-
# TODO TMA-1487: Make BLS and ensemble both load all composing model variants first
434433
for mrc in run_config.model_run_configs():
434+
# Load all composing model variants first, and then the parent model
435+
for composing_config_variant in mrc.composing_config_variants():
436+
if not self._load_model_variant(
437+
variant_config=composing_config_variant
438+
):
439+
return False
435440
if not self._load_model_variant(variant_config=mrc.model_config_variant()):
436441
return False
437-
438-
# Composing configs for BLS models are not automatically loaded by the top-level model
439-
if mrc.is_bls_model():
440-
for composing_config_variant in mrc.composing_config_variants():
441-
if not self._load_model_variant(
442-
variant_config=composing_config_variant
443-
):
444-
return False
445-
446442
return True
447443

448444
def _load_model_variant(self, variant_config: ModelConfigVariant) -> bool:

0 commit comments

Comments
 (0)