simaticai 2.4.0__tar.gz
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-2.4.0/PKG-INFO +23 -0
- simaticai-2.4.0/README.md +7 -0
- simaticai-2.4.0/pyproject.toml +102 -0
- simaticai-2.4.0/simaticai/README.md +1 -0
- simaticai-2.4.0/simaticai/__main__.py +34 -0
- simaticai-2.4.0/simaticai/data/__init__.py +7 -0
- simaticai-2.4.0/simaticai/data/__pycache__/__init__.cpython-310.pyc +0 -0
- simaticai-2.4.0/simaticai/data/__pycache__/__init__.cpython-311.pyc +0 -0
- simaticai-2.4.0/simaticai/data/log_module-1.0.1-py3-none-any.whl +0 -0
- simaticai-2.4.0/simaticai/data/schemas/__init__.py +8 -0
- simaticai-2.4.0/simaticai/data/schemas/__pycache__/__init__.cpython-310.pyc +0 -0
- simaticai-2.4.0/simaticai/data/schemas/__pycache__/__init__.cpython-311.pyc +0 -0
- simaticai-2.4.0/simaticai/data/schemas/__pycache__/__init__.cpython-312.pyc +0 -0
- simaticai-2.4.0/simaticai/data/schemas/datalink.schema.json +161 -0
- simaticai-2.4.0/simaticai/data/schemas/pipeline.schema.json +1241 -0
- simaticai-2.4.0/simaticai/data/schemas/runtime.schema.json +356 -0
- simaticai-2.4.0/simaticai/deployment.py +2417 -0
- simaticai-2.4.0/simaticai/helpers/__init__.py +24 -0
- simaticai-2.4.0/simaticai/helpers/model_config.py +237 -0
- simaticai-2.4.0/simaticai/helpers/pep508.py +216 -0
- simaticai-2.4.0/simaticai/helpers/reporter.py +625 -0
- simaticai-2.4.0/simaticai/helpers/tempfiles.py +47 -0
- simaticai-2.4.0/simaticai/helpers/yaml_helper.py +49 -0
- simaticai-2.4.0/simaticai/model_config_pb2.py +3392 -0
- simaticai-2.4.0/simaticai/packaging/__init__.py +7 -0
- simaticai-2.4.0/simaticai/packaging/constants.py +61 -0
- simaticai-2.4.0/simaticai/packaging/python_dependencies.py +275 -0
- simaticai-2.4.0/simaticai/packaging/wheelhouse.py +471 -0
- simaticai-2.4.0/simaticai/testing/__init__.py +42 -0
- simaticai-2.4.0/simaticai/testing/component_runner.py +280 -0
- simaticai-2.4.0/simaticai/testing/data_stream.py +12 -0
- simaticai-2.4.0/simaticai/testing/gpuruntime_requirements.txt +4 -0
- simaticai-2.4.0/simaticai/testing/pipeline_runner.py +594 -0
- simaticai-2.4.0/simaticai/testing/pipeline_validator.py +144 -0
- simaticai-2.4.0/simaticai/testing/run_component.py +136 -0
- simaticai-2.4.0/simaticai/testing/run_gpuruntime_component.py +117 -0
- simaticai-2.4.0/simaticai/testing/timeseries_stream.py +121 -0
- simaticai-2.4.0/simaticai/testing/vca_stream.py +101 -0
simaticai-2.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: simaticai
|
|
3
|
+
Version: 2.4.0
|
|
4
|
+
Summary: Software Development Kit for Industrial AI
|
|
5
|
+
License: MIT
|
|
6
|
+
Author: Siemens AG
|
|
7
|
+
Requires-Python: >=3.10.0
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# AI Software Development Kit
|
|
17
|
+
|
|
18
|
+
AI Software Development Kit is a Python library that allows you to create, package, and test AI inference pipelines for the
|
|
19
|
+
AI Inference Server. The AI SDK is accompanied by project templates that provide notebook-based workflows for training models,
|
|
20
|
+
packaging them for deployment and testing these packages.
|
|
21
|
+
|
|
22
|
+
Some of the AI SDK functionalities require pip version 21.3.1 or greater, so installing the library will upgrade your pip in the given Python environment.
|
|
23
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# AI Software Development Kit
|
|
2
|
+
|
|
3
|
+
AI Software Development Kit is a Python library that allows you to create, package, and test AI inference pipelines for the
|
|
4
|
+
AI Inference Server. The AI SDK is accompanied by project templates that provide notebook-based workflows for training models,
|
|
5
|
+
packaging them for deployment and testing these packages.
|
|
6
|
+
|
|
7
|
+
Some of the AI SDK functionalities require pip version 21.3.1 or greater, so installing the library will upgrade your pip in the given Python environment.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "simaticai"
|
|
3
|
+
version = "2.4.0"
|
|
4
|
+
|
|
5
|
+
dependencies = [
|
|
6
|
+
"joblib (>=1.5.1,<2.0.0)",
|
|
7
|
+
"jsonschema (>=4.0.1,<5.0.0)",
|
|
8
|
+
"markuppy (>=1.14,<2.0)",
|
|
9
|
+
"parsley (==1.3)",
|
|
10
|
+
"pip (>=25.1.1,<26.0.0)",
|
|
11
|
+
"opencv-python-headless (>=4.11.0.86,<5.0.0.0)",
|
|
12
|
+
"protobuf (>=6.31.0,<7.0.0)",
|
|
13
|
+
"pyyaml (>=6.0.1,<7.0.0)",
|
|
14
|
+
"requests (>=2.32.3,<3.0.0)",
|
|
15
|
+
"onnx (>=1.18.0,<2.0.0)",
|
|
16
|
+
"onnxruntime (>=1.22.0,<2.0.0)",
|
|
17
|
+
"idna (>=3.10,<4.0)",
|
|
18
|
+
"wheel (>=0.45.1,<0.46.0)"
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://github.com/industrial-edge/ai-sdk"
|
|
23
|
+
Documentation = "https://github.com/industrial-edge/ai-sdk-tutorials"
|
|
24
|
+
Repository = "https://github.com/industrial-edge/ai-sdk.git"
|
|
25
|
+
Issues = "https://github.com/industrial-edge/ai-sdk/issues"
|
|
26
|
+
Changelog = "https://github.com/industrial-edge/ai-sdk/blob/main/CHANGELOG.md"
|
|
27
|
+
|
|
28
|
+
[build-system]
|
|
29
|
+
requires = ["poetry-core<=1.8.0"]
|
|
30
|
+
build-backend = "poetry.core.masonry.api"
|
|
31
|
+
|
|
32
|
+
[tool.poetry]
|
|
33
|
+
name = "simaticai"
|
|
34
|
+
version = "2.4.0"
|
|
35
|
+
description = "Software Development Kit for Industrial AI"
|
|
36
|
+
authors = ["Siemens AG"]
|
|
37
|
+
|
|
38
|
+
license = "MIT"
|
|
39
|
+
readme = "README.md"
|
|
40
|
+
|
|
41
|
+
include = ["simaticai/data/**/*"]
|
|
42
|
+
packages = [{include = "simaticai"}]
|
|
43
|
+
classifiers = [
|
|
44
|
+
"Programming Language :: Python :: 3",
|
|
45
|
+
"Operating System :: OS Independent",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[tool.poetry.dependencies]
|
|
49
|
+
python = ">=3.10.0"
|
|
50
|
+
|
|
51
|
+
[tool.poetry.group.dev.dependencies]
|
|
52
|
+
autopep8 = "^1.6.0"
|
|
53
|
+
cloudpickle = "^2.2.1"
|
|
54
|
+
flake8 = "^4.0.1"
|
|
55
|
+
importlib-metadata = "^4.4.0"
|
|
56
|
+
pandas = "^1.5.3"
|
|
57
|
+
portray = "1.8.0"
|
|
58
|
+
pyarrow = "14.0.1"
|
|
59
|
+
pytest = "^8.2.0"
|
|
60
|
+
pytest-cov = "^5.0.0"
|
|
61
|
+
pytest-html = "^4.1.1"
|
|
62
|
+
pytest-httpserver = "^1.0.10"
|
|
63
|
+
requests = "^2.31.0"
|
|
64
|
+
scikit-learn = "^1.0.2"
|
|
65
|
+
mkdocs-material = "8.5.0"
|
|
66
|
+
packaging = "^23.0"
|
|
67
|
+
|
|
68
|
+
[[tool.poetry.source]]
|
|
69
|
+
name = "testpypi"
|
|
70
|
+
url = "https://test.pypi.org/legacy/"
|
|
71
|
+
priority = "supplemental"
|
|
72
|
+
|
|
73
|
+
[tool.pytest.ini_options]
|
|
74
|
+
minversion = "6.0"
|
|
75
|
+
testpaths = ["test"]
|
|
76
|
+
log_cli = true
|
|
77
|
+
log_level = "INFO"
|
|
78
|
+
markers = [
|
|
79
|
+
"integration: mark tests as integration tests",
|
|
80
|
+
"feature: mark tests as feature tests"
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[tool.portray]
|
|
84
|
+
overwrite = true
|
|
85
|
+
output_dir = "dist/documentation"
|
|
86
|
+
|
|
87
|
+
[tool.portray.mkdocs]
|
|
88
|
+
copyright = "Copyright (C) Siemens AG 2021. All Rights Reserved."
|
|
89
|
+
repo_url = ""
|
|
90
|
+
repo_name = ""
|
|
91
|
+
site_name = "AI Software Development Kit"
|
|
92
|
+
edit_uri = ""
|
|
93
|
+
use_directory_urls = false
|
|
94
|
+
extra_css = [ "styles.css" ]
|
|
95
|
+
|
|
96
|
+
[tool.portray.mkdocs.theme]
|
|
97
|
+
name = "material"
|
|
98
|
+
custom_dir = 'css'
|
|
99
|
+
logo = 'Sie_logo_white.svg'
|
|
100
|
+
favicon = 'favicon.ico'
|
|
101
|
+
include_search_page = false
|
|
102
|
+
search_index_only = 'false'
|
|
@@ -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.
|
|
@@ -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
|
|
Binary file
|
|
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
|
+
}
|