Skip to content

Commit

Permalink
Flatten training environment fields (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
duckontheweb authored Dec 14, 2021
1 parent a8f59f6 commit f7d7dea
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 33 deletions.
32 changes: 13 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,8 @@ these models for the following types of use-cases:
| 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. |
| 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. |
| 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. |
| 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. |

### Training Environment Object

| Field Name | Type | Description |
| -------------------------- | ------------------------- | ----------- |
| operating-system | string | Identifies the operating system on which the model was trained. See the [Operating System](#operating-system) description below for recommended values. |
| processor-type | string | The type of processor used during training. Must be one of `"cpu"` or `"gpu"`. |

#### Operating System

It is STRONGLY RECOMMENDED that one of the following operating system identifiers (taken from the Python [`sys.platform`
values](https://docs.python.org/3/library/sys.html#sys.platform) be used whenever possible:

- `aix`
- `linux`
- `win32`
- `cygwin`
- `darwin`
| ml-model:training-processor-type | string | The type of processor used during training. Must be one of `"cpu"` or `"gpu"`. |
| 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. |

### Additional Field Information

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

### ml-model:training-os

It is STRONGLY RECOMMENDED that one of the following operating system identifiers (taken from the Python [`sys.platform`
values](https://docs.python.org/3/library/sys.html#sys.platform) be used whenever possible:

- `aix`
- `linux`
- `win32`
- `cygwin`
- `darwin`

## Asset Objects

### Roles
Expand Down
6 changes: 2 additions & 4 deletions examples/dummy/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@
"ml-model:learning_approach": "supervised",
"ml-model:prediction_type": "object-detection",
"ml-model:architecture": "RCNN",
"ml-model:training-environment": {
"processor-type": "gpu",
"operating-system": "linux"
}
"ml-model:training-processor-type": "gpu",
"ml-model:training-os": "linux"
},
"links": [
{
Expand Down
16 changes: 6 additions & 10 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,12 @@
"ml-model:architecture": {
"type": "string"
},
"ml-model:training-environment": {
"type": "object",
"properties": {
"operating-system": {
"type": "string"
},
"processor-type": {
"type": "string"
}
}
"ml-model:training-os": {
"type": "string"
},
"ml-model:training-processor-type": {
"type": "string",
"enum": ["cpu", "gpu"]
}
},
"patternProperties": {
Expand Down

0 comments on commit f7d7dea

Please sign in to comment.