simaticai 2.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- simaticai/README.md +1 -0
- simaticai/__main__.py +34 -0
- simaticai/data/__init__.py +7 -0
- simaticai/data/log_module-1.0.1-py3-none-any.whl +0 -0
- simaticai/data/schemas/__init__.py +8 -0
- simaticai/data/schemas/datalink.schema.json +161 -0
- simaticai/data/schemas/pipeline.schema.json +1241 -0
- simaticai/data/schemas/runtime.schema.json +356 -0
- simaticai/deployment.py +2417 -0
- simaticai/helpers/__init__.py +24 -0
- simaticai/helpers/model_config.py +237 -0
- simaticai/helpers/pep508.py +216 -0
- simaticai/helpers/reporter.py +625 -0
- simaticai/helpers/tempfiles.py +47 -0
- simaticai/helpers/yaml_helper.py +49 -0
- simaticai/model_config_pb2.py +3392 -0
- simaticai/packaging/__init__.py +7 -0
- simaticai/packaging/constants.py +61 -0
- simaticai/packaging/python_dependencies.py +275 -0
- simaticai/packaging/wheelhouse.py +471 -0
- simaticai/testing/__init__.py +42 -0
- simaticai/testing/component_runner.py +280 -0
- simaticai/testing/data_stream.py +12 -0
- simaticai/testing/gpuruntime_requirements.txt +4 -0
- simaticai/testing/pipeline_runner.py +594 -0
- simaticai/testing/pipeline_validator.py +144 -0
- simaticai/testing/run_component.py +136 -0
- simaticai/testing/run_gpuruntime_component.py +117 -0
- simaticai/testing/timeseries_stream.py +121 -0
- simaticai/testing/vca_stream.py +101 -0
- simaticai-2.4.0.dist-info/METADATA +23 -0
- simaticai-2.4.0.dist-info/RECORD +33 -0
- simaticai-2.4.0.dist-info/WHEEL +4 -0
simaticai/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The `simaticai` namespace combines the AI SDK components. The `simaticai` python package provides the core modules listed below. Other `simaticai_*` python packages extend this namespace with their own submodules.
|
simaticai/__main__.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright (C) Siemens AG 2021. All Rights Reserved. Confidential.
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
AI Software Development Kit CLI
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import argparse
|
|
8
|
+
|
|
9
|
+
from simaticai import deployment
|
|
10
|
+
|
|
11
|
+
argparser = argparse.ArgumentParser(prog='python -m simaticai', description="AI SDK command line interface.", add_help=True)
|
|
12
|
+
cmd_parsers = argparser.add_subparsers(dest='command')
|
|
13
|
+
|
|
14
|
+
parser_convert_package = cmd_parsers.add_parser('convert_package', help="Convert a Pipeline Configuration Package to an Edge Configuration Package that can be directly deployed.")
|
|
15
|
+
parser_convert_package.add_argument('package_zip', help="""Path to the input package file.
|
|
16
|
+
For "{path}/{name}_{version}.zip", the output file will be created as "{path}/{name}-edge_{version}.zip".
|
|
17
|
+
If a file with such a name already exists, it is overwritten.""")
|
|
18
|
+
|
|
19
|
+
parser_delta_package = cmd_parsers.add_parser('create_delta_package', help="Create a Delta Configuration Package that can be deployed onto the original pipeline on AI Inference Server.")
|
|
20
|
+
parser_delta_package.add_argument('origin_package', help="Path to Origin Edge Package file.")
|
|
21
|
+
parser_delta_package.add_argument('new_package', help="Path to New Edge Package file.")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
args = argparser.parse_args()
|
|
25
|
+
|
|
26
|
+
if args.command == "convert_package":
|
|
27
|
+
target_zip = deployment.convert_package(args.package_zip)
|
|
28
|
+
print(f"Package successfully converted and saved as '{target_zip}'")
|
|
29
|
+
|
|
30
|
+
elif args.command == "create_delta_package":
|
|
31
|
+
target_zip = deployment.create_delta_package(args.origin_package, args.new_package)
|
|
32
|
+
print(f"Delta package successfully created and saved as '{target_zip}'")
|
|
33
|
+
else:
|
|
34
|
+
argparser.error("No subcommand selected.")
|
|
Binary file
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "#/properties/datalink_metadata",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "Datalink Metadata",
|
|
6
|
+
"description": "Describes the minimal content on the Datalink Metadata file.",
|
|
7
|
+
"default": {},
|
|
8
|
+
"examples": [
|
|
9
|
+
{
|
|
10
|
+
"fileFormatVersion": 1,
|
|
11
|
+
"id": "70aa432a-8dcb-4015-8b68-b3ad0ae7a62a",
|
|
12
|
+
"version": "0.0.1",
|
|
13
|
+
"createdOn": "2021-03-16T09:57:16.692Z",
|
|
14
|
+
"inputs": [
|
|
15
|
+
{
|
|
16
|
+
"name": "temperature",
|
|
17
|
+
"mapping": "ie/d/j/simatic/v1/s7c1/dp/r/BozokiAir/default:BozokiAir_DB_temperature",
|
|
18
|
+
"type": "Real"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "pressure",
|
|
22
|
+
"mapping": "ie/d/j/simatic/v1/s7c1/dp/r/BozokiAir/default:BozokiAir_DB_pressure",
|
|
23
|
+
"type": "Real"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "density",
|
|
27
|
+
"mapping": "ie/d/j/simatic/v1/s7c1/dp/r/BozokiAir/default:BozokiAir_DB_density",
|
|
28
|
+
"type": "Real"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"required": [
|
|
34
|
+
"fileFormatVersion",
|
|
35
|
+
"id",
|
|
36
|
+
"version",
|
|
37
|
+
"createdOn",
|
|
38
|
+
"inputs"
|
|
39
|
+
],
|
|
40
|
+
"properties": {
|
|
41
|
+
"fileFormatVersion": {
|
|
42
|
+
"$id": "#/properties/fileFormatVersion",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"title": "fileFormatVersion",
|
|
45
|
+
"description": "Configuration file format version",
|
|
46
|
+
"examples": [
|
|
47
|
+
1
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"id": {
|
|
51
|
+
"$id": "#/properties/id",
|
|
52
|
+
"type": "string",
|
|
53
|
+
"title": "id",
|
|
54
|
+
"description": "Dataset id",
|
|
55
|
+
"default": "",
|
|
56
|
+
"examples": [
|
|
57
|
+
"70aa432a-8dcb-4015-8b68-b3ad0ae7a62a"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"version": {
|
|
61
|
+
"$id": "#/properties/version",
|
|
62
|
+
"type": "string",
|
|
63
|
+
"title": "version",
|
|
64
|
+
"description": "Dataset version",
|
|
65
|
+
"default": "",
|
|
66
|
+
"examples": [
|
|
67
|
+
"0.0.1"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"createdOn": {
|
|
71
|
+
"$id": "#/properties/createdOn",
|
|
72
|
+
"type": "string",
|
|
73
|
+
"title": "createdOn",
|
|
74
|
+
"description": "Dataset creation ISO datetime ",
|
|
75
|
+
"default": "",
|
|
76
|
+
"examples": [
|
|
77
|
+
"2021-03-16T09:57:16.692Z"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"inputs": {
|
|
81
|
+
"$id": "#/properties/inputs",
|
|
82
|
+
"type": "array",
|
|
83
|
+
"title": "inputs",
|
|
84
|
+
"description": "Dataset variable list, commonly are the predicted model input/features",
|
|
85
|
+
"default": [],
|
|
86
|
+
"examples": [
|
|
87
|
+
[
|
|
88
|
+
{
|
|
89
|
+
"name": "temperature",
|
|
90
|
+
"mapping": "ie/d/j/simatic/v1/s7c1/dp/r/BozokiAir/default:BozokiAir_DB_temperature",
|
|
91
|
+
"type": "Real"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "pressure",
|
|
95
|
+
"mapping": "ie/d/j/simatic/v1/s7c1/dp/r/BozokiAir/default:BozokiAir_DB_pressure",
|
|
96
|
+
"type": "Real"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
],
|
|
100
|
+
"additionalItems": true,
|
|
101
|
+
"items": {
|
|
102
|
+
"$id": "#/properties/inputs/items",
|
|
103
|
+
"anyOf": [
|
|
104
|
+
{
|
|
105
|
+
"$id": "#/properties/inputs/items/anyOf/0",
|
|
106
|
+
"type": "object",
|
|
107
|
+
"title": "variable detail",
|
|
108
|
+
"description": "Specify the variables information, how it links with the Databus",
|
|
109
|
+
"default": {},
|
|
110
|
+
"examples": [
|
|
111
|
+
{
|
|
112
|
+
"name": "temperature",
|
|
113
|
+
"mapping": "ie/d/j/simatic/v1/s7c1/dp/r/BozokiAir/default:BozokiAir_DB_temperature",
|
|
114
|
+
"type": "Real"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"required": [
|
|
118
|
+
"name",
|
|
119
|
+
"mapping",
|
|
120
|
+
"type"
|
|
121
|
+
],
|
|
122
|
+
"properties": {
|
|
123
|
+
"name": {
|
|
124
|
+
"$id": "#/properties/inputs/items/anyOf/0/properties/name",
|
|
125
|
+
"type": "string",
|
|
126
|
+
"title": "variable name",
|
|
127
|
+
"description": "Name of the variable",
|
|
128
|
+
"default": "",
|
|
129
|
+
"examples": [
|
|
130
|
+
"temperature"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"mapping": {
|
|
134
|
+
"$id": "#/properties/inputs/items/anyOf/0/properties/mapping",
|
|
135
|
+
"type": "string",
|
|
136
|
+
"title": "databusTopic",
|
|
137
|
+
"description": "Topic associated with the variable on Databus",
|
|
138
|
+
"default": "",
|
|
139
|
+
"examples": [
|
|
140
|
+
"ie/d/j/simatic/v1/s7c1/dp/r/BozokiAir/default:BozokiAir_DB_temperature"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"type": {
|
|
144
|
+
"$id": "#/properties/inputs/items/anyOf/0/properties/type",
|
|
145
|
+
"type": "string",
|
|
146
|
+
"title": "variable type",
|
|
147
|
+
"description": "Type of the variable",
|
|
148
|
+
"default": "",
|
|
149
|
+
"examples": [
|
|
150
|
+
"Real","Integer", "String"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"additionalProperties": true
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"additionalProperties": true
|
|
161
|
+
}
|