upgini 1.1.291a3232.post3__py3-none-any.whl → 1.1.292__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.

Potentially problematic release.


This version of upgini might be problematic. Click here for more details.

upgini/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.1.291a3232-3"
1
+ __version__ = "1.1.292"
upgini/autofe/unary.py CHANGED
@@ -114,15 +114,14 @@ class Freq(PandasOperand):
114
114
  return self._loc(data, value_counts)
115
115
 
116
116
 
117
- class Norm(PandasOperand, VectorizableMixin):
117
+ class Norm(PandasOperand):
118
118
  name = "norm"
119
119
  is_unary = True
120
120
  output_type = "float"
121
121
 
122
122
  def calculate_unary(self, data: pd.Series) -> pd.Series:
123
- normalized_data = Normalizer().transform(data.to_frame().T).T
124
- return pd.Series(normalized_data[:, 0], index=data.index, name=data.name)
125
-
126
- def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
127
- normalized_data = Normalizer().transform(data.T).T
128
- return pd.DataFrame(normalized_data, index=data.index, columns=data.columns)
123
+ data_dropna = data.dropna()
124
+ normalized_data = Normalizer().transform(data_dropna.to_frame().T).T
125
+ normalized_data = pd.Series(normalized_data[:, 0], index=data_dropna.index, name=data.name)
126
+ normalized_data = normalized_data.reindex(data.index)
127
+ return normalized_data
@@ -347,3 +347,29 @@ class DataSourcePublisher:
347
347
  self.upload_online(search_keys=keys)
348
348
 
349
349
  print("All ADS-es successfully uploaded")
350
+
351
+ def union_search_tasks(
352
+ self,
353
+ search_ids: List[str],
354
+ target_user_email: str,
355
+ selected_features: Optional[List[str]] = None,
356
+ exclude_features: Optional[List[str]] = None,
357
+ ) -> str:
358
+ if not search_ids:
359
+ raise Exception("Empty search ids list")
360
+
361
+ if not target_user_email:
362
+ raise Exception("Empty target user email")
363
+
364
+ request = {
365
+ "search_task_ids": search_ids,
366
+ "target_user_email": target_user_email,
367
+ }
368
+ if selected_features:
369
+ request["selected_features"] = selected_features
370
+ if exclude_features:
371
+ request["exclude_features"] = exclude_features
372
+
373
+ response = self._rest_client.union_search_tasks(request, "trace_id")
374
+ print(response)
375
+ return response
upgini/http.py CHANGED
@@ -291,6 +291,7 @@ class _RestClient:
291
291
  GET_ACTIVE_ADS_DEFINITIONS_URI = "private/api/v2/ads/definitions"
292
292
  UPLOAD_ONLINE_URI = "private/api/v2/ads/upload-online"
293
293
  STOP_ADS_MANAGEMENT_TASK_URI_FMT = "private/api/v2/ads/management-task/{0}/stop"
294
+ UNION_SEARCH_TASKS_URI_FMT = SERVICE_ROOT_V2 + "search/merge"
294
295
 
295
296
  ACCESS_TOKEN_HEADER_NAME = "Authorization"
296
297
  CONTENT_TYPE_HEADER_NAME = "Content-Type"
@@ -760,6 +761,10 @@ class _RestClient:
760
761
  api_path = self.STOP_ADS_MANAGEMENT_TASK_URI_FMT.format(ads_management_task_id)
761
762
  self._with_unauth_retry(lambda: self._send_post_req(api_path, trace_id))
762
763
 
764
+ def union_search_tasks(self, request: dict, trace_id: str):
765
+ api_path = self.UNION_SEARCH_TASKS_URI_FMT
766
+ return self._with_unauth_retry(lambda: self._send_post_req(api_path, trace_id, request, result_format=None))
767
+
763
768
  # ---
764
769
 
765
770
  def _send_get_req(self, api_path: str, trace_id: Optional[str], additional_headers: Optional[dict] = None):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: upgini
3
- Version: 1.1.291a3232.post3
3
+ Version: 1.1.292
4
4
  Summary: Intelligent data search & enrichment for Machine Learning
5
5
  Project-URL: Bug Reports, https://github.com/upgini/upgini/issues
6
6
  Project-URL: Homepage, https://upgini.com/
@@ -1,10 +1,10 @@
1
- upgini/__about__.py,sha256=cRF02lu4xw6jygI8-Pm-EKge0Js7vS1ywPBBNcxhPus,31
1
+ upgini/__about__.py,sha256=ftI-AhPhhGVokbUGBIG7BOU1TcKcaEDEyviqLQdHimM,24
2
2
  upgini/__init__.py,sha256=asENHgEVHQBIkV-e_0IhE_ZWqkCG6398U3ZLrNzAH6k,407
3
3
  upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
4
4
  upgini/dataset.py,sha256=7TLVVhGtjgx_9yaiaIUK3kZSe_R9wg5dY0d4F5qCGM4,45636
5
5
  upgini/errors.py,sha256=2b_Wbo0OYhLUbrZqdLIx5jBnAsiD1Mcenh-VjR4HCTw,950
6
6
  upgini/features_enricher.py,sha256=Bfqbzqj3h1Ox3s6hBA4UYXkG7hQDqGPB4JK1YXtxXxw,177530
7
- upgini/http.py,sha256=khrYSldpY-HbVLCcApfV1BjBFK6Uyuatb4colKybxgY,42301
7
+ upgini/http.py,sha256=bp6jWl422Icy3AhHMdCcJv5NjExE45gSMmzMTPJjPuk,42600
8
8
  upgini/metadata.py,sha256=qDAIO7NLSSQp_XiXCv3U4XJTLO0KH3YuQ8lvCLYPqzs,9781
9
9
  upgini/metrics.py,sha256=DLvA2YLV4f7lnzBCcfZ5T4NkqAv3pbstbjTepavuT7U,30688
10
10
  upgini/search_task.py,sha256=LtRJ9bCPjMo1gJ-sUDKERhDwGcWKImrzwVFHjkMSQHQ,17071
@@ -19,10 +19,10 @@ upgini/autofe/date.py,sha256=qzk0NT332Q0vR1eRwTuNiMSrGE3ulh6Ic3QLBZqSdvw,7284
19
19
  upgini/autofe/feature.py,sha256=_V9B74B3ue7eAYXSOt9JKhVC9klkAKks22MwnBRye_w,12487
20
20
  upgini/autofe/groupby.py,sha256=4WjDzQxqpZxB79Ih4ihMMI5GDxaFqiH6ZelfV82ClT4,3091
21
21
  upgini/autofe/operand.py,sha256=MKEsl3zxpWzRDpTkE0sNJxTu62U20sWOvEKhPjUWS6s,2915
22
- upgini/autofe/unary.py,sha256=_BjdjPRFCZSL42hX_MSzQeIvtTVZ_FnvasRZKMtuayc,3739
22
+ upgini/autofe/unary.py,sha256=ZWjLd-CUkNt_PpM8YuWLLipW1v_RdBlsl4JxXIVo9aM,3652
23
23
  upgini/autofe/vector.py,sha256=dLxfAstJs-gw_OQ1xxoxcM6pVzORlV0HVzdzt7cLXVQ,606
24
24
  upgini/data_source/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- upgini/data_source/data_source_publisher.py,sha256=B4fJ1owDCF5ZZ0Ca9ywi_CXVt4iPvABh5BGTnXdXmHk,16635
25
+ upgini/data_source/data_source_publisher.py,sha256=2BCFcglyZC1T5WYerqd_GGC6dg22o2Mh-ce53wOIOjQ,17465
26
26
  upgini/mdc/__init__.py,sha256=aM08nIWFc2gWdWUa3_IuEnNND0cQPkBGnYpRMnfFN8k,1019
27
27
  upgini/mdc/context.py,sha256=3u1B-jXt7tXEvNcV3qmR9SDCseudnY7KYsLclBdwVLk,1405
28
28
  upgini/normalizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -56,7 +56,7 @@ upgini/utils/sklearn_ext.py,sha256=13jQS_k7v0aUtudXV6nGUEWjttPQzAW9AFYL5wgEz9k,4
56
56
  upgini/utils/target_utils.py,sha256=Y96_PJ5cC-WsEbeqg20v9uqywDQobLoTb-xoP7S3o4E,7807
57
57
  upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
58
58
  upgini/utils/warning_counter.py,sha256=dIWBB4dI5XRRJZudvIlqlIYKEiwLLPcXarsZuYRt338,227
59
- upgini-1.1.291a3232.post3.dist-info/METADATA,sha256=S0aJ1bcO5UxRuM0UiqKCUP2t2qhBqVjdx1vYeSt976U,48128
60
- upgini-1.1.291a3232.post3.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
61
- upgini-1.1.291a3232.post3.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
62
- upgini-1.1.291a3232.post3.dist-info/RECORD,,
59
+ upgini-1.1.292.dist-info/METADATA,sha256=VsA4dkEyCQEUAunLd-p24iOLBHnVFFMMVCb5SisZjck,48117
60
+ upgini-1.1.292.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
61
+ upgini-1.1.292.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
62
+ upgini-1.1.292.dist-info/RECORD,,