upgini 1.1.316a5__py3-none-any.whl → 1.2.0a1__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.316a5"
1
+ __version__ = "1.2.0a1"
upgini/autofe/binary.py CHANGED
@@ -141,7 +141,7 @@ class Distance(PandasOperand):
141
141
 
142
142
  def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
143
143
  return pd.Series(
144
- 1 - self.__dot(left, right) / (self.__dot(left, left) * self.__dot(right, right)), index=left.index
144
+ 1 - self.__dot(left, right) / (self.__norm(left) * self.__norm(right)), index=left.index
145
145
  )
146
146
 
147
147
  # row-wise dot product
@@ -152,6 +152,9 @@ class Distance(PandasOperand):
152
152
  res = res.reindex(left.index.union(right.index))
153
153
  return res
154
154
 
155
+ def __norm(self, vector: pd.Series) -> pd.Series:
156
+ return np.sqrt(self.__dot(vector, vector))
157
+
155
158
 
156
159
  # Left for backward compatibility
157
160
  class Sim(Distance):
upgini/autofe/date.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import abc
2
+ import json
2
3
  from typing import Any, Dict, List, Optional, Union
3
4
 
4
5
  import numpy as np
@@ -259,7 +260,7 @@ class DatePercentile(DatePercentileBase):
259
260
  @field_validator('zero_bounds', mode='before')
260
261
  def parse_zero_bounds(cls, value):
261
262
  if isinstance(value, str):
262
- return value[1:-1].split(", ")
263
+ return json.loads(value)
263
264
  return value
264
265
  else:
265
266
  # Use @validator for Pydantic 1.x
@@ -268,7 +269,7 @@ class DatePercentile(DatePercentileBase):
268
269
  @validator('zero_bounds', pre=True)
269
270
  def parse_zero_bounds(cls, value):
270
271
  if isinstance(value, str):
271
- return value[1:-1].split(", ")
272
+ return json.loads(value)
272
273
  return value
273
274
 
274
275
  def _get_bounds(self, date_col: pd.Series) -> pd.Series:
@@ -2668,6 +2668,7 @@ class FeaturesEnricher(TransformerMixin):
2668
2668
 
2669
2669
  autofe_description = self.get_autofe_features_description()
2670
2670
  if autofe_description is not None:
2671
+ self.logger.info(f"AutoFE descriptions: {autofe_description}")
2671
2672
  display_html_dataframe(autofe_description, autofe_description, "*Description of AutoFE feature names")
2672
2673
 
2673
2674
  if self._has_paid_features(exclude_features_sources):
upgini/search_task.py CHANGED
@@ -3,6 +3,7 @@ import tempfile
3
3
  import time
4
4
  from functools import lru_cache
5
5
  from typing import Dict, List, Optional
6
+ import uuid
6
7
 
7
8
  import pandas as pd
8
9
 
@@ -97,10 +98,7 @@ class SearchTask:
97
98
  time.sleep(self.POLLING_DELAY_SECONDS)
98
99
  except KeyboardInterrupt as e:
99
100
  if not check_fit:
100
- print(bundle.get("search_stopping"))
101
- self.rest_client.stop_search_task_v2(trace_id, search_task_id)
102
- self.logger.warning(f"Search {search_task_id} stopped by user")
103
- print(bundle.get("search_stopped"))
101
+ self._stop(trace_id)
104
102
  raise e
105
103
  print()
106
104
 
@@ -133,6 +131,14 @@ class SearchTask:
133
131
 
134
132
  return self
135
133
 
134
+ def _stop(self, trace_id: Optional[str] = None):
135
+ trace_id = trace_id or uuid.uuid4()
136
+ search_task_id = self.initial_search_task_id if self.initial_search_task_id is not None else self.search_task_id
137
+ print(bundle.get("search_stopping"))
138
+ self.rest_client.stop_search_task_v2(trace_id, search_task_id)
139
+ self.logger.warning(f"Search {search_task_id} stopped by user")
140
+ print(bundle.get("search_stopped"))
141
+
136
142
  def get_all_features_metadata_v2(self) -> Optional[List[FeaturesMetadataV2]]:
137
143
  if self.provider_metadata_v2 is None:
138
144
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: upgini
3
- Version: 1.1.316a5
3
+ Version: 1.2.0a1
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,22 +1,22 @@
1
- upgini/__about__.py,sha256=5SaWm460mZelKwFqDXwqvCt7MFnWhCTJ17oJESSgrVA,26
1
+ upgini/__about__.py,sha256=dMk28IuEJr_qWW7xH2uH2BnZ8G_djCORGGd6opmGetw,24
2
2
  upgini/__init__.py,sha256=Xs0YFVBu1KUdtZzbStGRPQtLt3YLzJnjx5nIUBlX8BE,415
3
3
  upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
4
4
  upgini/dataset.py,sha256=olZ-OHSfBNoBSCo7R5t7uCLukI2nO7afpx_A-HCiJLk,31067
5
5
  upgini/errors.py,sha256=2b_Wbo0OYhLUbrZqdLIx5jBnAsiD1Mcenh-VjR4HCTw,950
6
- upgini/features_enricher.py,sha256=9l8C3p6OaLkgE9O_kln_uJxqY1A7qqDgi5_l7X7ukeE,188002
6
+ upgini/features_enricher.py,sha256=twH4qdl91iHZF_AraLk0aIbRDw61S_DYtCWCZ34Yjjg,188077
7
7
  upgini/http.py,sha256=21asexflvavydzCOONJDGQBtQanCElrbnqLXakJ9Cu8,42880
8
8
  upgini/lazy_import.py,sha256=74gQ8JuA48BGRLxAo7lNHNKY2D2emMxrUxKGdxVGhuY,1012
9
9
  upgini/metadata.py,sha256=osmzdNESeh7yP3BZday6N9Q3eaIHfzhhRM1d6NSgcf0,11223
10
10
  upgini/metrics.py,sha256=Tu5cN8RlhOSSMWUTXRSkdl8SWBqR1N_2eJpBum9pZxc,30926
11
- upgini/search_task.py,sha256=LtRJ9bCPjMo1gJ-sUDKERhDwGcWKImrzwVFHjkMSQHQ,17071
11
+ upgini/search_task.py,sha256=qxUxAD-bed-FpZYmTB_4orW7YJsW_O6a1TcgnZIRFr4,17307
12
12
  upgini/spinner.py,sha256=4iMd-eIe_BnkqFEMIliULTbj6rNI2HkN_VJ4qYe0cUc,1118
13
13
  upgini/version_validator.py,sha256=ddSKUK_-eGJB3NgrqOMoWJU-OxQ253WsNLp8aqJkaIM,1389
14
14
  upgini/ads_management/__init__.py,sha256=qzyisOToVRP-tquAJD1PblZhNtMrOB8FiyF9JvfkvgE,50
15
15
  upgini/ads_management/ads_manager.py,sha256=igVbN2jz80Umb2BUJixmJVj-zx8unoKpecVo-R-nGdw,2648
16
16
  upgini/autofe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  upgini/autofe/all_operands.py,sha256=3LiH9iU-ArGmYpS8FHWH7yCFx40ILfvlSXJlKIa75BQ,2542
18
- upgini/autofe/binary.py,sha256=xRBT7RNqQ7pprz6cRpO1KnvZCb7PvU3QXBfaP6Omqi4,7425
19
- upgini/autofe/date.py,sha256=ku3kcmzpPmyUmpXHIBwT6JCIkaslRknW8DifUXvFnG8,9762
18
+ upgini/autofe/binary.py,sha256=TRjEdxsfyPY5E8ksYfdKMmU6GtvALfGFPNVIG7DBhzM,7520
19
+ upgini/autofe/date.py,sha256=OpFc3Al0xO3qlESn2Uokfxw51ArVqmh3xngWwdrsaqE,9762
20
20
  upgini/autofe/feature.py,sha256=gwGWY2UcX_0wHAvfEiu1rRU7GFZyzMWZIaPVcf6kD80,14223
21
21
  upgini/autofe/groupby.py,sha256=r-xl_keZZgm_tpiEoDhjYSkT6NHv7a4cRQR4wJ4uCp8,3263
22
22
  upgini/autofe/operand.py,sha256=uk883RaNqgXqtkaRqA1re1d9OFnnpv0JVvelYx09Yw0,2943
@@ -57,7 +57,7 @@ upgini/utils/sklearn_ext.py,sha256=13jQS_k7v0aUtudXV6nGUEWjttPQzAW9AFYL5wgEz9k,4
57
57
  upgini/utils/target_utils.py,sha256=BVtDmrmFMKerSUWaNOIEdzsYHIFiODdpnWbE50QDPDc,7864
58
58
  upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
59
59
  upgini/utils/warning_counter.py,sha256=dIWBB4dI5XRRJZudvIlqlIYKEiwLLPcXarsZuYRt338,227
60
- upgini-1.1.316a5.dist-info/METADATA,sha256=xGm11UrAxkdD9Fi3SYyek-IDOvUcDxA68Dy8cH0gQ3c,48232
61
- upgini-1.1.316a5.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
62
- upgini-1.1.316a5.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
63
- upgini-1.1.316a5.dist-info/RECORD,,
60
+ upgini-1.2.0a1.dist-info/METADATA,sha256=568JisotupYzFolx0QDyv_qN5CtSIEuHuium23_SDp8,48230
61
+ upgini-1.2.0a1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
62
+ upgini-1.2.0a1.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
63
+ upgini-1.2.0a1.dist-info/RECORD,,