wizata-dsapi 1.3.27__tar.gz → 1.3.29__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.
Files changed (54) hide show
  1. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/PKG-INFO +1 -1
  2. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/mlmodel.py +60 -0
  3. wizata_dsapi-1.3.29/wizata_dsapi/version.py +1 -0
  4. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi.egg-info/PKG-INFO +1 -1
  5. wizata_dsapi-1.3.27/wizata_dsapi/version.py +0 -1
  6. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/LICENSE.txt +0 -0
  7. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/README.rst +0 -0
  8. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/setup.cfg +0 -0
  9. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/setup.py +0 -0
  10. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/__init__.py +0 -0
  11. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/api_config.py +0 -0
  12. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/api_dto.py +0 -0
  13. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/api_interface.py +0 -0
  14. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/bucket.py +0 -0
  15. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/business_label.py +0 -0
  16. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/context.py +0 -0
  17. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/dataframe_toolkit.py +0 -0
  18. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/datapoint.py +0 -0
  19. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/datastore.py +0 -0
  20. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/ds_dataframe.py +0 -0
  21. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  22. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/evaluation.py +0 -0
  23. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/execution.py +0 -0
  24. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/experiment.py +0 -0
  25. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/group_system.py +0 -0
  26. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/ilogger.py +0 -0
  27. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/insight.py +0 -0
  28. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/model_toolkit.py +0 -0
  29. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/models/__init__.py +0 -0
  30. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/models/common.py +0 -0
  31. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/paged_query_result.py +0 -0
  32. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/pipeline.py +0 -0
  33. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/pipeline_image.py +0 -0
  34. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/plot.py +0 -0
  35. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/plots/__init__.py +0 -0
  36. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/plots/common.py +0 -0
  37. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/request.py +0 -0
  38. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/script.py +0 -0
  39. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/scripts/__init__.py +0 -0
  40. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/scripts/common.py +0 -0
  41. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/solution_component.py +0 -0
  42. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/streamlit_utils.py +0 -0
  43. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/template.py +0 -0
  44. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/trigger.py +0 -0
  45. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/twin.py +0 -0
  46. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/twinregistration.py +0 -0
  47. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/wizard_function.py +0 -0
  48. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/wizard_request.py +0 -0
  49. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/wizata_dsapi_client.py +0 -0
  50. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi/words.py +0 -0
  51. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
  52. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  53. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi.egg-info/requires.txt +0 -0
  54. {wizata_dsapi-1.3.27 → wizata_dsapi-1.3.29}/wizata_dsapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 1.3.27
3
+ Version: 1.3.29
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -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
@@ -0,0 +1 @@
1
+ __version__ = "1.3.29"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 1.3.27
3
+ Version: 1.3.29
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -1 +0,0 @@
1
- __version__ = "1.3.27"
File without changes
File without changes
File without changes
File without changes