wizata-dsapi 1.3.27__py3-none-any.whl → 1.3.29__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.
- wizata_dsapi/mlmodel.py +60 -0
- wizata_dsapi/version.py +1 -1
- {wizata_dsapi-1.3.27.dist-info → wizata_dsapi-1.3.29.dist-info}/METADATA +1 -1
- {wizata_dsapi-1.3.27.dist-info → wizata_dsapi-1.3.29.dist-info}/RECORD +7 -7
- {wizata_dsapi-1.3.27.dist-info → wizata_dsapi-1.3.29.dist-info}/WHEEL +0 -0
- {wizata_dsapi-1.3.27.dist-info → wizata_dsapi-1.3.29.dist-info}/licenses/LICENSE.txt +0 -0
- {wizata_dsapi-1.3.27.dist-info → wizata_dsapi-1.3.29.dist-info}/top_level.txt +0 -0
wizata_dsapi/mlmodel.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from typing import List, Iterator, Union
|
|
2
|
+
import os
|
|
2
3
|
from .api_dto import ApiDto
|
|
4
|
+
from datetime import datetime
|
|
3
5
|
|
|
4
6
|
|
|
5
7
|
def get_bool(obj, name: str):
|
|
@@ -9,6 +11,26 @@ def get_bool(obj, name: str):
|
|
|
9
11
|
return bool(obj[name])
|
|
10
12
|
|
|
11
13
|
|
|
14
|
+
class ModelFile:
|
|
15
|
+
"""
|
|
16
|
+
define a model file.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
def __init__(self,
|
|
20
|
+
full_path: str = None,
|
|
21
|
+
path: str = None,
|
|
22
|
+
name: str = None,
|
|
23
|
+
extension: str = None,
|
|
24
|
+
last_modified: datetime = None,
|
|
25
|
+
size: int = None):
|
|
26
|
+
self.full_path = full_path
|
|
27
|
+
self.path = path
|
|
28
|
+
self.name = name
|
|
29
|
+
self.extension = extension
|
|
30
|
+
self.last_modified = last_modified
|
|
31
|
+
self.size = size
|
|
32
|
+
|
|
33
|
+
|
|
12
34
|
class ModelInfo:
|
|
13
35
|
"""
|
|
14
36
|
define a pointer to a machine learning model.
|
|
@@ -47,6 +69,33 @@ class ModelInfo:
|
|
|
47
69
|
self.has_target_feat = False
|
|
48
70
|
self.label_counts = 0
|
|
49
71
|
|
|
72
|
+
@classmethod
|
|
73
|
+
def split_identifier(cls, identifier: str):
|
|
74
|
+
"""
|
|
75
|
+
split the identifier into four parts
|
|
76
|
+
:param identifier: identifier.
|
|
77
|
+
:return: key, twin, property, alias
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
# extract alias
|
|
81
|
+
if "@" in identifier:
|
|
82
|
+
split_identifier_for_alias = identifier.split("@")
|
|
83
|
+
identifier = split_identifier_for_alias[0]
|
|
84
|
+
alias = split_identifier_for_alias[1]
|
|
85
|
+
else:
|
|
86
|
+
alias = None
|
|
87
|
+
|
|
88
|
+
# extract key, twin, property
|
|
89
|
+
identifiers = identifier.split('.')
|
|
90
|
+
key = identifiers[0]
|
|
91
|
+
twin_hardware_id = None
|
|
92
|
+
if len(identifiers) > 1:
|
|
93
|
+
twin_hardware_id = identifiers[1]
|
|
94
|
+
property_value = None
|
|
95
|
+
if len(identifiers) > 2:
|
|
96
|
+
property_value = identifiers[2]
|
|
97
|
+
|
|
98
|
+
return key, twin_hardware_id, property_value, alias
|
|
50
99
|
|
|
51
100
|
def identifier(self, include_alias: bool = False) -> str:
|
|
52
101
|
"""
|
|
@@ -69,6 +118,17 @@ class ModelInfo:
|
|
|
69
118
|
|
|
70
119
|
return identifier
|
|
71
120
|
|
|
121
|
+
def add_file(self, file: ModelFile):
|
|
122
|
+
"""
|
|
123
|
+
add a path to list of known path.
|
|
124
|
+
detect depending on file type further actions.
|
|
125
|
+
:param file: ModelFile
|
|
126
|
+
:return: None
|
|
127
|
+
"""
|
|
128
|
+
if file.name == "trained_model":
|
|
129
|
+
self.file_format = file.extension
|
|
130
|
+
self.files.append(file)
|
|
131
|
+
|
|
72
132
|
def to_json(self):
|
|
73
133
|
"""
|
|
74
134
|
convert this entity in a dict that can be json serializable
|
wizata_dsapi/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.3.
|
|
1
|
+
__version__ = "1.3.29"
|
|
@@ -16,7 +16,7 @@ wizata_dsapi/experiment.py,sha256=QYQ1CJ-MTWsXq08xYbm5sAp95dRxbPOmGDgaAOoBMDQ,46
|
|
|
16
16
|
wizata_dsapi/group_system.py,sha256=6rUKe0_J3YWACysyBlzuw_TEpKNXgLOMxhpWsNxOzwY,1708
|
|
17
17
|
wizata_dsapi/ilogger.py,sha256=iYnID-Z-qrYhie26C43404aIuU4_tHSKXbDeQIdo82Q,807
|
|
18
18
|
wizata_dsapi/insight.py,sha256=ABFZ04DqYxxzqAEfU1tzlTZqqrigM-zN-8Lbetko3g0,6468
|
|
19
|
-
wizata_dsapi/mlmodel.py,sha256=
|
|
19
|
+
wizata_dsapi/mlmodel.py,sha256=qBVWKtQq_uR4P5TMCELG3tq0iNA3Kcg2A8BNvsA1jnY,18613
|
|
20
20
|
wizata_dsapi/model_toolkit.py,sha256=UNyw5CFSgZeXydQFsiDIRTjoMeqIsdyIIuiwumLW5bA,1574
|
|
21
21
|
wizata_dsapi/paged_query_result.py,sha256=0Iyt2Kd4tvrfthhT-tk9EmSERsbJTaPNON2euHcBn6k,1150
|
|
22
22
|
wizata_dsapi/pipeline.py,sha256=WDJeOxPZJiYW1qwTNZUm3jom2epIxqrSoiUwcrTF9EE,31300
|
|
@@ -31,7 +31,7 @@ wizata_dsapi/template.py,sha256=wtCRKKk3PchH4RrNgNYlEF_9C6bzZwKIeLyEvgv6Fdo,1370
|
|
|
31
31
|
wizata_dsapi/trigger.py,sha256=w3BZYP-L3SUwvaT0oCTanh_Ewn57peZvlt7vxzHv9J8,5129
|
|
32
32
|
wizata_dsapi/twin.py,sha256=S0DUzQf1smZXZTdXpXZPtkZYCfKIhw53EecCnsl9i4Q,11017
|
|
33
33
|
wizata_dsapi/twinregistration.py,sha256=Mi6-YuwroiEXc0c1hgrOaphh4hNVoHupxOnXedVtJtE,13377
|
|
34
|
-
wizata_dsapi/version.py,sha256=
|
|
34
|
+
wizata_dsapi/version.py,sha256=v0GaiEfE6X9hH5kIhmiD9dSjXeEG-iPa_CiUg7rkZQs,23
|
|
35
35
|
wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
|
|
36
36
|
wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
|
|
37
37
|
wizata_dsapi/wizata_dsapi_client.py,sha256=h8iSz7IGbP-Zq9rbqMdq-hTrt16laD1JeaRWPzaLaoo,77695
|
|
@@ -42,8 +42,8 @@ wizata_dsapi/plots/__init__.py,sha256=qgnSFqrjOPur-807M8uh5awIfjM1ZHXUXcAqHc-r2l
|
|
|
42
42
|
wizata_dsapi/plots/common.py,sha256=jdPsJqLHBwSKc6dX83BSGPqSRxzIVNHSYO5yI_8sjGk,6568
|
|
43
43
|
wizata_dsapi/scripts/__init__.py,sha256=hAxiETSQf0qOHde1si1tEAJU48seqEgHrchCzS2-LvQ,80
|
|
44
44
|
wizata_dsapi/scripts/common.py,sha256=efwq-Rd0lvYljIs3gSFz9izogBD7asOU2cTK-IvHTkM,4244
|
|
45
|
-
wizata_dsapi-1.3.
|
|
46
|
-
wizata_dsapi-1.3.
|
|
47
|
-
wizata_dsapi-1.3.
|
|
48
|
-
wizata_dsapi-1.3.
|
|
49
|
-
wizata_dsapi-1.3.
|
|
45
|
+
wizata_dsapi-1.3.29.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
46
|
+
wizata_dsapi-1.3.29.dist-info/METADATA,sha256=-unMinwkmaUia0tk-AH-DI5tFUfTL5897GJlRBxsR2I,5844
|
|
47
|
+
wizata_dsapi-1.3.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
48
|
+
wizata_dsapi-1.3.29.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
|
|
49
|
+
wizata_dsapi-1.3.29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|