Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions example/job/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"...": "include(theory/ml/input.json)"
}
3 changes: 1 addition & 2 deletions example/job/model/method/workflow/unit/execution.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"compute": null,
"input": [
{
"content": "K_POINTS automatic\n2 2 2 0 0 0",
"name": "pw_scf.in"
"...": "include(execution/input.json)"
}
]
}
4 changes: 4 additions & 0 deletions example/job/model/method/workflow/unit/execution/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"content": "K_POINTS automatic\n2 2 2 0 0 0",
"name": "pw_scf.in"
}
12 changes: 12 additions & 0 deletions example/job/theory/ml/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"method":{
"type": "linear",
"subtype": "least_squares"
},
"fitParameters": [
"sample_weight"
],
"targetProperties":[
"band_gaps"
]
}
12 changes: 12 additions & 0 deletions example/job/theory/ml/linear/input_data
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"c8zG3XcnnTybfP3QQ": {
"Ge": 0.3125,
"Si": 0.6875,
"lattice_volume": 327.1127749111
},
"wWK2XCyivQrG8j34Z": {
"Ge": 0.1875,
"Si": 0.8125,
"lattice_volume": 327.1127749111
}
}
12 changes: 12 additions & 0 deletions example/job/theory/ml/linear/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"property": "band_gaps",
"coefficients":[
-3.339e-01,
2.555e-01,
-1.005e-02
],
"intercept": 0.45,
"modelData" : {
"...": "include(input_data)"
}
}
4 changes: 4 additions & 0 deletions example/job/theory/ml/linear/precision.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"trainingError": 0.1,
"cvError": 0.3
}
4 changes: 3 additions & 1 deletion schema/job/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
},
{
"$ref": "file:software/vasp.json"
},
{
"$ref": "file:software/ml.json"
}
],
"required": [
"name",
"flavor",
"version",
"exec"
]
Expand Down
10 changes: 10 additions & 0 deletions schema/job/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "application schema",
"type": "object",
"oneOf": [
{
"$ref": "file:theory/ml/input.json"
}
]
}
3 changes: 3 additions & 0 deletions schema/job/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"oneOf": [
{
"$ref": "file:theory/dft.json"
},
{
"$ref": "file:theory/ml.json"
}
],
"required": [
Expand Down
4 changes: 2 additions & 2 deletions schema/job/model/method.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"oneOf": [
{
"$ref": "file:../theory/dft/pseudopotential.json"
"$ref": "file:../theory/dft/_methods.json"
},
{
"$ref": "file:../theory/dft/local-orbital.json"
"$ref": "file:../theory/ml/_methods.json"
}
],
"required": [
Expand Down
19 changes: 7 additions & 12 deletions schema/job/model/method/workflow/unit/execution.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,15 @@
"description": "Unit's input.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Input file name. e.g. pw_scf.in",
"type": "string"
"oneOf": [
{
"description": "textual input (eg. for simulation engines)",
"$ref": "file:execution/input.json"
},
"content": {
"description": "Content of the input file. e.g. &CONTROL calculation='scf' ...",
"type": "string"
{
"description": "object input (eg. for machine learning)",
"$ref": "file:../../../../input.json"
}
},
"required": [
"name",
"content"
]
}
}
Expand Down
19 changes: 19 additions & 0 deletions schema/job/model/method/workflow/unit/execution/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "execution unit text input schema",
"type": "object",
"properties": {
"name": {
"description": "Input file name. e.g. pw_scf.in",
"type": "string"
},
"content": {
"description": "Content of the input file. e.g. &CONTROL calculation='scf' ...",
"type": "string"
}
},
"required": [
"name",
"content"
]
}
27 changes: 27 additions & 0 deletions schema/job/software/ml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "default machine learning app schema",
"type": "object",
"properties": {
"name": {
"enum": [
"ml"
]
},
"summary": {
"enum": [
"Default Machine Learning Engine"
]
},
"version": {
"enum": [
"0.1.1"
]
},
"exec": {
"enum": [
"rupy"
]
}
}
}
12 changes: 12 additions & 0 deletions schema/job/theory/dft/_methods.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "List of methods",
"oneOf": [
{
"$ref": "file:local-orbital.json"
},
{
"$ref": "file:pseudopotential.json"
}
]
}
18 changes: 18 additions & 0 deletions schema/job/theory/ml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "machine learning schema",
"description": "machine learning schema",
"properties": {
"type": {
"enum": [
"machine_learning"
]
},
"subtype": {
"enum": [
"supervised",
"unsupervised"
]
}
}
}
9 changes: 9 additions & 0 deletions schema/job/theory/ml/_methods.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "List of methods",
"oneOf": [
{
"$ref": "file:linear.json"
}
]
}
36 changes: 36 additions & 0 deletions schema/job/theory/ml/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Execution unit input schema for machine learning",
"type": "object",
"properties": {
"method": {
"description": "method information",
"type": "object",
"properties": {
"type": {
"description": "method type",
"type": "string"
},
"subtype": {
"description": "method subtype",
"type": "string"
}
},
"required": [
"type",
"subtype"
]
},
"fitParameters": {
"description": "additional parameters used for model fitting using method subtype",
"type": "array"
},
"targetProperties": {
"description": "target properties to predict",
"type": "array"
}
},
"required": [
"targetProperties"
]
}
17 changes: 17 additions & 0 deletions schema/job/theory/ml/linear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "linear methods schema",
"properties": {
"type": {
"enum": [
"least_squares"
]
},
"precision": {
"$ref": "file:linear/precision.json"
},
"data":{
"$ref":"file:linear/parameters.json"
}
}
}
6 changes: 6 additions & 0 deletions schema/job/theory/ml/linear/inputData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"descritpion": "Input data used for ML method",
"title": "input data schema",
"type": "object"
}
26 changes: 26 additions & 0 deletions schema/job/theory/ml/linear/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "regression parameters schema",
"properties": {
"property": {
"type": "string",
"description": "name of the predicted or optimized characteristic"
},
"coefficients": {
"type": "array",
"description": "weights/coefficients of the function from linear or non-linear fit"
},
"intercept": {
"type": "number",
"description": "intercept (shift) from the linear fit of data points"
},
"inputData": {
"$ref":"file:inputData.json"
}
},
"required": [
"property",
"coefficients",
"intercept"
]
}
18 changes: 18 additions & 0 deletions schema/job/theory/ml/linear/precision.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "precision schema for regression",
"properties": {
"trainingError": {
"description": "training error of the estimator",
"type": "number"
},
"cvError": {
"description": "cross validation error of the estimator",
"type": "number"
}
},
"required": [
"trainingError",
"cvError"
]
}