Skip to content

Commit 6736e84

Browse files
committed
[projmgr] Add generated-by node in *.cbuild-mlops.yml files
1 parent f999786 commit 6736e84

5 files changed

Lines changed: 10 additions & 3 deletions

File tree

tools/projmgr/schemas/common.schema.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,8 @@
14951495
},
14961496
"west": { "$ref": "#/definitions/WestProjectType" }
14971497
},
1498-
"additionalProperties": false
1498+
"additionalProperties": false,
1499+
"required": ["generated-by"]
14991500
},
15001501
"BuildPacksInfoType": {
15011502
"type": "array",
@@ -2524,7 +2525,7 @@
25242525
"debug-topology": { "$ref": "#/definitions/DebugTopologyType" }
25252526
},
25262527
"additionalProperties": false,
2527-
"required": ["output", "debugger"]
2528+
"required": ["generated-by", "output", "debugger"]
25282529
},
25292530
"TargetSetsType": {
25302531
"title": "target-set:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#target-set",
@@ -2690,6 +2691,7 @@
26902691
"type": ["null", "object"],
26912692
"properties": {
26922693
"description": { "type": "string", "description": "Brief description of the MLOps configuration." },
2694+
"generated-by": { "type": "string", "description": "Tool name along with version information used to generate this file." },
26932695
"processor": {
26942696
"type": "object",
26952697
"description": "Processor information.",
@@ -2728,7 +2730,8 @@
27282730
"hardware": { "$ref": "#/definitions/MlopsRunDescType" },
27292731
"simulator": { "$ref": "#/definitions/MlopsRunDescType" }
27302732
},
2731-
"additionalProperties": false
2733+
"additionalProperties": false,
2734+
"required": ["generated-by"]
27322735
},
27332736
"MlopsOutputType": {
27342737
"type": "object",

tools/projmgr/src/ProjMgrCbuildMlops.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class ProjMgrCbuildMlops : public ProjMgrCbuildBase {
3131

3232
ProjMgrCbuildMlops::ProjMgrCbuildMlops(YAML::Node node,
3333
const MlopsType& mlops, const std::string& directory) : m_directory(directory) {
34+
SetNodeValue(node[YAML_GENERATED_BY], ORIGINAL_FILENAME + string(" version ") + VERSION_STRING);
3435
SetNodeValue(node[YAML_DESCRIPTION], mlops.description);
3536
SetProcessorNode(node[YAML_PROCESSOR], mlops.processor);
3637
SetNpuNode(node[YAML_NPU], mlops.npu);

tools/projmgr/test/data/MLOps/ref/extended.cbuild-mlops.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cbuild-mlops:
2+
generated-by: csolution version 0.0.0
23
description: ML model with extended configuration
34
processor:
45
type: Cortex-M0

tools/projmgr/test/data/MLOps/ref/minimal.cbuild-mlops.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cbuild-mlops:
2+
generated-by: csolution version 0.0.0
23
description: ML model with minimal configuration
34
processor:
45
type: Cortex-M0

tools/projmgr/test/data/MLOps/ref/minimal_image_only.cbuild-mlops.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cbuild-mlops:
2+
generated-by: csolution version 0.0.0
23
description: ML model with minimal image-only configuration
34
processor:
45
type: Cortex-M0

0 commit comments

Comments
 (0)