Skip to content

Commit 9e455c2

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

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

tools/projmgr/schemas/common.schema.json

Lines changed: 8 additions & 4 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",
@@ -1995,7 +1996,8 @@
19951996
"groups": { "$ref": "#/definitions/GroupsType" },
19961997
"components": { "$ref": "#/definitions/ComponentsType" }
19971998
},
1998-
"additionalProperties": false
1999+
"additionalProperties": false,
2000+
"required": ["generated-by"]
19992001
},
20002002
"ExecutesType": {
20012003
"title": "executes:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#executes",
@@ -2524,7 +2526,7 @@
25242526
"debug-topology": { "$ref": "#/definitions/DebugTopologyType" }
25252527
},
25262528
"additionalProperties": false,
2527-
"required": ["output", "debugger"]
2529+
"required": ["generated-by", "output", "debugger"]
25282530
},
25292531
"TargetSetsType": {
25302532
"title": "target-set:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#target-set",
@@ -2690,6 +2692,7 @@
26902692
"type": ["null", "object"],
26912693
"properties": {
26922694
"description": { "type": "string", "description": "Brief description of the MLOps configuration." },
2695+
"generated-by": { "type": "string", "description": "Tool name along with version information used to generate this file." },
26932696
"processor": {
26942697
"type": "object",
26952698
"description": "Processor information.",
@@ -2728,7 +2731,8 @@
27282731
"hardware": { "$ref": "#/definitions/MlopsRunDescType" },
27292732
"simulator": { "$ref": "#/definitions/MlopsRunDescType" }
27302733
},
2731-
"additionalProperties": false
2734+
"additionalProperties": false,
2735+
"required": ["generated-by"]
27322736
},
27332737
"MlopsOutputType": {
27342738
"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)