wizata-dsapi 1.3.13__py3-none-any.whl → 1.3.14__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 CHANGED
@@ -1,5 +1,8 @@
1
1
  import json
2
2
  import uuid
3
+
4
+ from typing_extensions import deprecated
5
+
3
6
  from .api_dto import ApiDto
4
7
  from enum import Enum
5
8
 
@@ -228,6 +231,97 @@ class MLModelConfig(ApiDto):
228
231
  raise TypeError(f'unsupported target_feat type {self.target_feat.__class__.__name__}')
229
232
 
230
233
 
234
+ class ModelList:
235
+ """
236
+ used to conveniently manipulate a list of models.
237
+ """
238
+
239
+ def __init__(self):
240
+ self.models = []
241
+
242
+ class ModelInfo:
243
+ """
244
+ define a pointer to a machine learning model.
245
+ """
246
+
247
+ def __init__(self,
248
+ key: str,
249
+ twin_hardware_id: str = None,
250
+ property_name: str = None,
251
+ alias: str = None,
252
+ file_format: str = 'pkl',
253
+ source: str = 'wizata'
254
+ ):
255
+ self.key = key
256
+ self.twin_hardware_id = twin_hardware_id
257
+ self.property_name = property_name
258
+ self.alias = alias
259
+ self.file_format = file_format
260
+ self.source = source
261
+ self.files = []
262
+
263
+ def identifier(self, include_alias: bool = False) -> str:
264
+ """
265
+ returns the complete string identifier for this model.
266
+ :param include_alias: include the alias pointer or leave it to target the default version.
267
+ :return: complete identifier of a model.
268
+ """
269
+ if self.key is None:
270
+ raise KeyError('please specific a model key')
271
+ identifier = self.key
272
+
273
+ if self.twin_hardware_id is not None:
274
+ identifier += f".{self.twin_hardware_id}"
275
+
276
+ if self.property_name is not None:
277
+ identifier += f".{self.property_name}"
278
+
279
+ if include_alias and self.alias is not None:
280
+ identifier += f"@{self.alias}"
281
+
282
+ return identifier
283
+
284
+ def to_json(self):
285
+ """
286
+ convert this entity in a dict that can be json serializable
287
+ :return: dict
288
+ """
289
+ obj = {
290
+ "key": self.key,
291
+ "file_format": self.file_format,
292
+ "source": self.source
293
+ }
294
+ if self.twin_hardware_id is not None:
295
+ obj["twin_hardware_id"] = str(self.twin_hardware_id)
296
+ if self.property_name is not None:
297
+ obj["property_name"] = self.property_name
298
+ if self.alias is not None:
299
+ obj["alias"] = self.alias
300
+ if self.file_format is not None:
301
+ obj["file_format"] = self.file_format
302
+ if self.source is not None:
303
+ obj["source"] = self.source
304
+ return obj
305
+
306
+ def from_json(self, obj):
307
+ """
308
+ load this entity from a dict
309
+ """
310
+ if "key" in obj.keys():
311
+ self.key = obj["key"]
312
+ if "twin_hardware_id" in obj.keys():
313
+ self.twin_hardware_id = obj["twin_hardware_id"]
314
+ if "property_name" in obj.keys():
315
+ self.property_name = obj["property_name"]
316
+ if "alias" in obj.keys():
317
+ self.alias = obj["alias"]
318
+ if "file_format" in obj.keys():
319
+ self.key = obj["file_format"]
320
+ if "source" in obj.keys():
321
+ self.source = obj["source"]
322
+
323
+
324
+ @deprecated
231
325
  class MLModel(ApiDto):
232
326
  """
233
327
  used to define a stored machine learning model within Wizata.
wizata_dsapi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.13"
1
+ __version__ = "1.3.14"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 1.3.13
3
+ Version: 1.3.14
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -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=VwjiG6nmljA2MOlAL04jxMBgR3FmNa6NIQWNGDlTmEQ,15108
19
+ wizata_dsapi/mlmodel.py,sha256=iZHmmRzGj4Y5VNRflH6Kg6p4vhjdXeeBjmJherdpGM0,17966
20
20
  wizata_dsapi/model_toolkit.py,sha256=a76ckSuetSKDjEkOl7o49g9oaItdw9iOaPt0JcstmhU,1551
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=NmFHSfJMssSLEZ5kJ2rElH-VzEUA8mv-lp3KSlUbCDw,23
34
+ wizata_dsapi/version.py,sha256=GHcahUqpyc0hVhmDLwlPLuNF5Fjh1z_TnSAcEI6KL7s,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=kos_8j47CBXiy6y6b_H2yDUe3aWh76diEmWjCisYKkY,78662
@@ -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.13.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
46
- wizata_dsapi-1.3.13.dist-info/METADATA,sha256=V9NFWlrTlkgSgLjT9lRE9dACPAj7zlChaMxrTpM5px0,5651
47
- wizata_dsapi-1.3.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- wizata_dsapi-1.3.13.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
49
- wizata_dsapi-1.3.13.dist-info/RECORD,,
45
+ wizata_dsapi-1.3.14.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
46
+ wizata_dsapi-1.3.14.dist-info/METADATA,sha256=0xIJprHlcwiceuJEBTiZ_rrlfWsMEFiXrNBBHMjfEUs,5651
47
+ wizata_dsapi-1.3.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ wizata_dsapi-1.3.14.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
49
+ wizata_dsapi-1.3.14.dist-info/RECORD,,