wizata-dsapi 1.4.0.dev19__py3-none-any.whl → 1.4.0.dev21__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.
@@ -39,7 +39,7 @@ class ExecutionLog(Dto):
39
39
 
40
40
  # non-persistent values
41
41
  :ivar dict properties: properties containing key/value pairs used to parametrize the pipeline execution
42
- :ivar list warnings: list of error and/or warning messages
42
+ :ivar list messages: list of error and/or warning messages
43
43
  """
44
44
 
45
45
  @classmethod
@@ -72,7 +72,8 @@ class ExecutionLog(Dto):
72
72
  trigger_id=uuid.UUID(data["executionTriggerId"]) if "executionTriggerId" in data and data["executionTriggerId"] is not None else None,
73
73
  version=data.get("version"),
74
74
  properties=properties,
75
- plots=_plots
75
+ plots=_plots,
76
+ messages=data.get("messages") or ([data.get("message")] if data.get("message") else None)
76
77
  )
77
78
 
78
79
  def __init__(self,
@@ -92,7 +93,8 @@ class ExecutionLog(Dto):
92
93
  trigger_id: uuid.UUID = None,
93
94
  version: str = None,
94
95
  properties: dict = None,
95
- plots: list = None):
96
+ plots: list = None,
97
+ messages: list = None):
96
98
 
97
99
  # labels
98
100
  self._experiment = None
@@ -146,7 +148,10 @@ class ExecutionLog(Dto):
146
148
  else:
147
149
  self.plots = []
148
150
  self.dataframes = []
149
- self.messages = []
151
+ if messages is not None:
152
+ self.messages = messages
153
+ else:
154
+ self.messages = []
150
155
 
151
156
  @property
152
157
  def experiment(self):
@@ -7,6 +7,7 @@ class PagedQueryResult:
7
7
  :ivar int size: number of records per page.
8
8
  :ivar str sort: column name used in sorting.
9
9
  :ivar int total: total number of results on all pages.
10
+ :ivar dict groups: statistics used for the execution logs charts.
10
11
  """
11
12
 
12
13
  def __init__(self,
@@ -14,7 +15,8 @@ class PagedQueryResult:
14
15
  page: int = None,
15
16
  size: int = None,
16
17
  sort: str = None,
17
- direction: str = None):
18
+ direction: str = None,
19
+ groups: dict = None):
18
20
  self.total = total
19
21
  self.page = page
20
22
  if page < 0:
@@ -29,6 +31,7 @@ class PagedQueryResult:
29
31
  if direction != 'asc' and direction != 'desc':
30
32
  raise ValueError("direction must be asc or desc")
31
33
  self.results = None
34
+ self.groups = groups if groups else {}
32
35
 
33
36
  def to_json(self):
34
37
  """
@@ -55,5 +58,6 @@ class PagedQueryResult:
55
58
  "sort": self.sort,
56
59
  "direction": sort_dir,
57
60
  "total": self.total,
58
- "results": formatted_results
61
+ "results": formatted_results,
62
+ "groups": self.groups
59
63
  }
wizata_dsapi/search.py CHANGED
@@ -17,6 +17,26 @@ class FilterOperator:
17
17
  SEARCH = "_search"
18
18
 
19
19
 
20
+ class GroupSummaryType:
21
+ """
22
+ Aggregate methods for group summary types.
23
+ """
24
+ SUM = "Sum"
25
+ AVG = "Avg"
26
+ MAX = "Max"
27
+ MIN = "Min"
28
+ COUNT = "Count"
29
+
30
+ class GroupOption:
31
+ def __init__(self, property_name: str):
32
+ self.property_name = property_name
33
+
34
+ class GroupSummary:
35
+ def __init__(self, type: str, property_name: str):
36
+ self.type = type
37
+ self.property_name = property_name
38
+
39
+
20
40
  class SortOption:
21
41
  def __init__(self, field: str, order: str = "asc"):
22
42
  self.field = field
@@ -38,14 +58,26 @@ class SearchQuery:
38
58
  sort_objs.append(SortOption(field=s["field"], order=s.get("order", "asc")))
39
59
 
40
60
  svc_name = data.get("serviceName") or data.get("service_name") or "pipeline_runner"
41
- return cls(
61
+
62
+ # New grouping feature
63
+ raw_groups = data.get("groups", [])
64
+ groups_objs = [GroupOption(g["propertyName"]) for g in raw_groups]
65
+
66
+ # GroupSummaries
67
+ raw_summaries = data.get("groupSummaries", [])
68
+ summaries_objs = [GroupSummary(s["type"], s["propertyName"]) for s in raw_summaries]
69
+
70
+ instance = cls(
42
71
  filters=data.get("filters", {}),
43
72
  sort=sort_objs,
44
73
  limit=data.get("limit", 5000),
45
74
  page=data.get("page", 1),
46
75
  size=data.get("size", 50),
47
- service_name=svc_name
76
+ service_name=svc_name,
77
+ groups = groups_objs,
78
+ group_summaries = summaries_objs
48
79
  )
80
+ return instance
49
81
 
50
82
  def __init__(self,
51
83
  filters: Optional[Dict[str, Any]] = None,
@@ -53,7 +85,9 @@ class SearchQuery:
53
85
  limit: int = 5000,
54
86
  page: int = 1,
55
87
  size: int = 50,
56
- service_name: str = "pipeline_runner"):
88
+ service_name: str = "pipeline_runner",
89
+ groups: Optional[List[GroupOption]] = None,
90
+ group_summaries: Optional[List[GroupSummary]] = None):
57
91
 
58
92
  self.filters = filters if filters is not None else {}
59
93
  self.sort = sort if sort is not None else []
@@ -61,4 +95,6 @@ class SearchQuery:
61
95
  self.page = page
62
96
  self.size = size
63
97
  self.service_name = service_name
98
+ self.groups = groups if groups is not None else []
99
+ self.group_summaries = group_summaries if group_summaries is not None else []
64
100
 
wizata_dsapi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.4.0.dev19"
1
+ __version__ = "1.4.0.dev21"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 1.4.0.dev19
3
+ Version: 1.4.0.dev21
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -12,27 +12,27 @@ wizata_dsapi/ds_dataframe.py,sha256=Sk2JRUuTRJzko3HosJnbK34STpgSJUlqxLq8w_E5VM4,
12
12
  wizata_dsapi/dsapi_json_encoder.py,sha256=_NJE2IncJCS-juOxV_IQWHq8WpaanKe2aWpGNZNUzyk,2062
13
13
  wizata_dsapi/evaluation.py,sha256=kB61SD66uRBBbKqiES7XZERn77bwhacbyufneSD4s8c,2222
14
14
  wizata_dsapi/execution.py,sha256=JuU8qZDcUZxtCvQwwvM_luwHi18GQ2jbBSxAjc2cSlM,14148
15
- wizata_dsapi/execution_log.py,sha256=Rx0J47xrnmQu6pNhYloJgTKc8IWH62GnU5lxYup9W1o,15186
15
+ wizata_dsapi/execution_log.py,sha256=bqfpck3L8CKYGftzcnSkbrr0-m45OMfhURGhTTVvsys,15417
16
16
  wizata_dsapi/experiment.py,sha256=QYQ1CJ-MTWsXq08xYbm5sAp95dRxbPOmGDgaAOoBMDQ,4631
17
17
  wizata_dsapi/group_system.py,sha256=6rUKe0_J3YWACysyBlzuw_TEpKNXgLOMxhpWsNxOzwY,1708
18
18
  wizata_dsapi/ilogger.py,sha256=YKBTRp7pHYtBlnzroGRPT91_bMVJT93Pft3fUGcFSIM,488
19
19
  wizata_dsapi/insight.py,sha256=ABFZ04DqYxxzqAEfU1tzlTZqqrigM-zN-8Lbetko3g0,6468
20
20
  wizata_dsapi/mlmodel.py,sha256=QkWBNordOQiw6Vv4xN_pxwJWqbBm29vY1dyDZgmMS_4,26324
21
21
  wizata_dsapi/model_toolkit.py,sha256=UNyw5CFSgZeXydQFsiDIRTjoMeqIsdyIIuiwumLW5bA,1574
22
- wizata_dsapi/paged_query_result.py,sha256=QU0JukkBk7wwfE43wOcj4so2aYpGj5r5_XobLfm8CnE,1939
22
+ wizata_dsapi/paged_query_result.py,sha256=WMtxMulIEiWMZxNwdgJcKfmm3mBOGKKO6zMeE1mhcQ0,2129
23
23
  wizata_dsapi/pipeline.py,sha256=gqZ6R8d8f_uz9xI3Umz2uN3yTD4N3jsBPltAIg--Bjk,31646
24
24
  wizata_dsapi/pipeline_image.py,sha256=4DhDo1SYftN6QcNbehNbM86VTD6EYGmtlcOmE5DP5Vc,6330
25
25
  wizata_dsapi/plot.py,sha256=-gV6rZJQDhGH4CV9BgefjeJWI--X5HDBOjseEzHr3Gc,1971
26
26
  wizata_dsapi/request.py,sha256=W4E1BHacQdJiBLPI96yVeHz41rbfFuGrbuw1U60L_DM,27560
27
27
  wizata_dsapi/script.py,sha256=DeEciwVpuCYZetgJCoivw_bYe8ma52WuTaTQ_VkLEcg,12930
28
- wizata_dsapi/search.py,sha256=LcWzjauHj4EzIl7aEXAsZGpX2IYl6e4Vw2jGWtdrfHI,1767
28
+ wizata_dsapi/search.py,sha256=I19VFsdvKOxnOgkjPWNI_Wd1ac_zacZBxU-zLwwv8Zk,2902
29
29
  wizata_dsapi/solution_component.py,sha256=8gbZWx2h_xUqI_pAXa3goqAnR5Y-GDMii8MeGlaK1IE,9531
30
30
  wizata_dsapi/streamlit_utils.py,sha256=sXBdygktbixV828Zg01Nl27_a4F8zGFc4RY0C8g-1bc,1942
31
31
  wizata_dsapi/template.py,sha256=wtCRKKk3PchH4RrNgNYlEF_9C6bzZwKIeLyEvgv6Fdo,13704
32
32
  wizata_dsapi/trigger.py,sha256=w3BZYP-L3SUwvaT0oCTanh_Ewn57peZvlt7vxzHv9J8,5129
33
33
  wizata_dsapi/twin.py,sha256=S0DUzQf1smZXZTdXpXZPtkZYCfKIhw53EecCnsl9i4Q,11017
34
34
  wizata_dsapi/twinregistration.py,sha256=Mi6-YuwroiEXc0c1hgrOaphh4hNVoHupxOnXedVtJtE,13377
35
- wizata_dsapi/version.py,sha256=6woUiUjylEF1x9D_eoucT5D_orylDh9JjUeIRE5wr2E,28
35
+ wizata_dsapi/version.py,sha256=qFeWqY-JbMX0fcG7ujiygB9jupydyyNEd6_udTU1GJw,28
36
36
  wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
37
37
  wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
38
38
  wizata_dsapi/wizata_dsapi_client.py,sha256=pClIADBb_CfgT4P4Hz9mopgsuC0Wa_XiZBuej7x5JUM,85056
@@ -43,8 +43,8 @@ wizata_dsapi/plots/__init__.py,sha256=qgnSFqrjOPur-807M8uh5awIfjM1ZHXUXcAqHc-r2l
43
43
  wizata_dsapi/plots/common.py,sha256=jdPsJqLHBwSKc6dX83BSGPqSRxzIVNHSYO5yI_8sjGk,6568
44
44
  wizata_dsapi/scripts/__init__.py,sha256=hAxiETSQf0qOHde1si1tEAJU48seqEgHrchCzS2-LvQ,80
45
45
  wizata_dsapi/scripts/common.py,sha256=efwq-Rd0lvYljIs3gSFz9izogBD7asOU2cTK-IvHTkM,4244
46
- wizata_dsapi-1.4.0.dev19.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
47
- wizata_dsapi-1.4.0.dev19.dist-info/METADATA,sha256=yG70qTgl-oMbEFTKoFiGT37WTIxpES7gmuSpJ2WSmJ0,4960
48
- wizata_dsapi-1.4.0.dev19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
49
- wizata_dsapi-1.4.0.dev19.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
50
- wizata_dsapi-1.4.0.dev19.dist-info/RECORD,,
46
+ wizata_dsapi-1.4.0.dev21.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
47
+ wizata_dsapi-1.4.0.dev21.dist-info/METADATA,sha256=F6Scf3P5H9pLa7zRq-c9DF0gqXGt42NJ3AJcDrUqyts,4960
48
+ wizata_dsapi-1.4.0.dev21.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
49
+ wizata_dsapi-1.4.0.dev21.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
50
+ wizata_dsapi-1.4.0.dev21.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5