[projmgr] MLOps: handle image-only target-set#2475
Conversation
Test Results 3 files - 55 21 suites - 155 18m 30s ⏱️ - 8m 54s Results for commit 550a06e. ± Comparison against base commit af2c644. This pull request removes 451 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
This PR extends projmgr MLOps generation to support target sets that provide prebuilt image artifacts instead of only project-context entries.
Changes:
- Adds image-only context discovery for MLOps target-set handling.
- Resolves target-set image paths into MLOps run outputs.
- Adds MLOps image-only test fixtures and expected output.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tools/projmgr/src/ProjMgrWorker.cpp |
Adds image-only target-type context creation. |
tools/projmgr/include/ProjMgrWorker.h |
Declares the image-only target helper. |
tools/projmgr/src/ProjMgrMlops.cpp |
Collects image-only contexts and image outputs for MLOps run types. |
tools/projmgr/include/ProjMgrMlops.h |
Updates SetMlopsRunType signature for target-set access. |
tools/projmgr/test/src/ProjMgrUnitTests.cpp |
Adds image-only MLOps tests and updates expected error text. |
tools/projmgr/test/data/MLOps/minimal.csolution.yml |
Updates minimal MLOps fixture metadata. |
tools/projmgr/test/data/MLOps/extended.csolution.yml |
Updates extended MLOps fixture metadata. |
tools/projmgr/test/data/MLOps/minimal_image_only.csolution.yml |
Adds a successful image-only MLOps fixture. |
tools/projmgr/test/data/MLOps/ref/minimal_image_only.cbuild-mlops.yml |
Adds expected MLOps output for image-only fixture. |
tools/projmgr/test/data/MLOps/failure_image_only_hw.csolution.yml |
Adds hardware image path failure fixture. |
tools/projmgr/test/data/MLOps/failure_image_only_sim.csolution.yml |
Adds simulator image path failure fixture. |
Comments suppressed due to low confidence (2)
tools/projmgr/src/ProjMgrMlops.cpp:191
- For image-only target sets, every
imageentry has an emptyproject-context, so they all map to the same synthetic context name (csolution.name + "+" + targetType). With multiple images this pushes the same context once per image;SetMlopsRunTypethen iterates the fulltargetSet.imagesfor each copied context, duplicating each output in the generated MLOps file.
for (const auto& entry : targetSet.images) {
const string contextName = (entry.context.empty() ? csolution.name : entry.context) + "+" + targetType;
if (contexts->find(contextName) != contexts->end()) {
// process context precedences if needed
auto& context = contexts->at(contextName);
if (!context.precedences) {
if (!m_worker->ParseContextLayers(context) || !m_worker->LoadPacks(context) ||
!m_worker->ProcessPrecedences(context, BoardOrDevice::Both) ||
!m_worker->SetTargetAttributes(context, context.targetAttributes)) {
return false;
}
m_worker->CollectNpuInfo(context);
}
ref.push_back(context);
tools/projmgr/src/ProjMgrMlops.cpp:142
- This infers the image type solely from the filename extension and ignores
ImageItem::type. Target-set images can specify an explicit type (the run-debug path preserves it inProjMgrRunDebug.cpp), so an image such asfirmware.outwithtype: elfwould be omitted from MLOps output even though the user declared it as an ELF image.
if (ProjMgrUtils::FileTypeFromExtension(item.image) == RteConstants::OUTPUT_TYPE_ELF) {
MlopsOutputType output;
output.file = item.image;
output.type = RteConstants::OUTPUT_TYPE_ELF;
run.output.push_back(output);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2475 +/- ##
==========================================
+ Coverage 65.18% 65.22% +0.03%
==========================================
Files 147 147
Lines 26633 26659 +26
Branches 16140 16155 +15
==========================================
+ Hits 17362 17389 +27
+ Misses 7072 7071 -1
Partials 2199 2199
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Fixes
Changes
project-context, handle target-sets withimage(image-only)Checklist