Skip to content

Commit abef2b1

Browse files
committed
Flatten training environment fields
1 parent a8f59f6 commit abef2b1

File tree

3 files changed

+21
-33
lines changed

3 files changed

+21
-33
lines changed

Diff for: README.md

+13-19
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,8 @@ these models for the following types of use-cases:
5959
| ml-model:learning_approach | string | **REQUIRED.** The learning approach used to train the model. It is STRONGLY RECOMMENDED that you use one of the values [described below](#ml-modellearning_approach), but other values are allowed. |
6060
| ml-model:prediction_type | string | **REQUIRED.** The type of prediction that the model makes. It is STRONGLY RECOMMENDED that you use one of the values [described below](#ml-modelprediction_type), but other values are allowed. |
6161
| ml-model:architecture | string | **REQUIRED.** Identifies the architecture employed by the model (e.g. RCNN, U-Net, etc.). This may be any string identifier, but publishers are encouraged to use well-known identifiers whenever possible. |
62-
| ml-model:training-environment | [Training Environment Object](#training-environment-object) | Describes the environment used to train the model. See the Link [relation types](#relation-types) defined below for definitions of the data used during training. |
63-
64-
### Training Environment Object
65-
66-
| Field Name | Type | Description |
67-
| -------------------------- | ------------------------- | ----------- |
68-
| operating-system | string | Identifies the operating system on which the model was trained. See the [Operating System](#operating-system) description below for recommended values. |
69-
| processor-type | string | The type of processor used during training. Must be one of `"cpu"` or `"gpu"`. |
70-
71-
#### Operating System
72-
73-
It is STRONGLY RECOMMENDED that one of the following operating system identifiers (taken from the Python [`sys.platform`
74-
values](https://docs.python.org/3/library/sys.html#sys.platform) be used whenever possible:
75-
76-
- `aix`
77-
- `linux`
78-
- `win32`
79-
- `cygwin`
80-
- `darwin`
62+
| ml-model:training-processor-type | string | The type of processor used during training. Must be one of `"cpu"` or `"gpu"`. |
63+
| ml-model:training-os | string | Identifies the operating system on which the model was trained. See the [description below](#ml-modeltraining-os) for recommended values. |
8164

8265
### Additional Field Information
8366

@@ -102,6 +85,17 @@ for a given [Learning Approach](#ml-modellearning_approach).
10285
- `"segmentation"`
10386
- `"regression"`
10487

88+
### ml-model:training-os
89+
90+
It is STRONGLY RECOMMENDED that one of the following operating system identifiers (taken from the Python [`sys.platform`
91+
values](https://docs.python.org/3/library/sys.html#sys.platform) be used whenever possible:
92+
93+
- `aix`
94+
- `linux`
95+
- `win32`
96+
- `cygwin`
97+
- `darwin`
98+
10599
## Asset Objects
106100

107101
### Roles

Diff for: examples/dummy/item.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@
5858
"ml-model:learning_approach": "supervised",
5959
"ml-model:prediction_type": "object-detection",
6060
"ml-model:architecture": "RCNN",
61-
"ml-model:training-environment": {
62-
"processor-type": "gpu",
63-
"operating-system": "linux"
64-
}
61+
"ml-model:training-processor-type": "gpu",
62+
"ml-model:training-os": "linux"
6563
},
6664
"links": [
6765
{

Diff for: json-schema/schema.json

+6-10
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,12 @@
182182
"ml-model:architecture": {
183183
"type": "string"
184184
},
185-
"ml-model:training-environment": {
186-
"type": "object",
187-
"properties": {
188-
"operating-system": {
189-
"type": "string"
190-
},
191-
"processor-type": {
192-
"type": "string"
193-
}
194-
}
185+
"ml-model:training-os": {
186+
"type": "string"
187+
},
188+
"ml-model:training-processor-type": {
189+
"type": "string",
190+
"enum": ["cpu", "gpu"]
195191
}
196192
},
197193
"patternProperties": {

0 commit comments

Comments
 (0)