upgini 1.2.128a1__py3-none-any.whl → 1.2.129__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.2.128a1"
1
+ __version__ = "1.2.129"
@@ -2558,7 +2558,7 @@ if response.status_code == 200:
2558
2558
  if self.__is_registered
2559
2559
  else "transform_usage_warning_demo"
2560
2560
  )
2561
- msg = self.bundle.get(bundle_msg).format(len(X), rest_rows)
2561
+ msg = self.bundle.get(bundle_msg).format(rest_rows, len(X))
2562
2562
  self.logger.warning(msg)
2563
2563
  print(msg)
2564
2564
  show_request_quote_button(is_registered=self.__is_registered)
@@ -5,6 +5,7 @@ import sys
5
5
  from functools import lru_cache
6
6
  from getpass import getuser
7
7
  from hashlib import sha256
8
+ from threading import Event, Lock
8
9
  from typing import Optional
9
10
  from uuid import getnode
10
11
 
@@ -51,19 +52,19 @@ def _get_execution_ide() -> str:
51
52
  return "other"
52
53
 
53
54
 
55
+ _inflight_lock = Lock()
56
+ _inflight_events = {}
57
+
58
+
54
59
  @lru_cache
55
- def get_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optional[str] = None) -> dict:
60
+ def _compute_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optional[str] = None) -> dict:
56
61
  # default values
57
- print("Start getting track metrics")
58
62
  track = {"ide": _get_execution_ide()}
59
- print("Track ide: ", track["ide"])
60
63
  ident_res = "https://api64.ipify.org"
61
64
 
62
65
  try:
63
66
  track["hostname"] = socket.gethostname()
64
- print("Track hostname: ", track["hostname"])
65
67
  track["whoami"] = getuser()
66
- print("Track whoami: ", track["whoami"])
67
68
  except Exception as e:
68
69
  track["hostname"] = "localhost"
69
70
  track["whoami"] = "root"
@@ -87,9 +88,7 @@ def get_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optiona
87
88
  """
88
89
  )
89
90
  )
90
- print("After display JS with visitorId")
91
91
  track["visitorId"] = output.eval_js("getVisitorId()", timeout_sec=30)
92
- print("Track visitorId: ", track["visitorId"])
93
92
  except Exception as e:
94
93
  track["err"] = str(e)
95
94
  if "visitorId" not in track:
@@ -112,9 +111,7 @@ def get_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optiona
112
111
  """
113
112
  )
114
113
  )
115
- print("After display JS with ip")
116
114
  track["ip"] = output.eval_js("getIP()", timeout_sec=10)
117
- print("Track ip: ", track["ip"])
118
115
  except Exception as e:
119
116
  track["err"] = str(e)
120
117
  if "ip" not in track:
@@ -172,3 +169,26 @@ def get_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optiona
172
169
  track["ip"] = "0.0.0.0"
173
170
 
174
171
  return track
172
+
173
+
174
+ def get_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optional[str] = None) -> dict:
175
+ key = (client_ip, client_visitorid)
176
+ with _inflight_lock:
177
+ event = _inflight_events.get(key)
178
+ if event is None:
179
+ event = Event()
180
+ _inflight_events[key] = event
181
+ is_owner = True
182
+ else:
183
+ is_owner = False
184
+
185
+ if not is_owner:
186
+ event.wait()
187
+ return _compute_track_metrics(client_ip, client_visitorid)
188
+
189
+ try:
190
+ return _compute_track_metrics(client_ip, client_visitorid)
191
+ finally:
192
+ with _inflight_lock:
193
+ event.set()
194
+ _inflight_events.pop(key, None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: upgini
3
- Version: 1.2.128a1
3
+ Version: 1.2.129
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,9 +1,9 @@
1
- upgini/__about__.py,sha256=0IfOlHrvtIj9lMq5rIqaMXXHCEFy-5GmtuHRuC-AsAw,26
1
+ upgini/__about__.py,sha256=SttPTxjmglNvCYf-RaBamJR5xyLR_He2hSyQw4Kd6PM,24
2
2
  upgini/__init__.py,sha256=LXSfTNU0HnlOkE69VCxkgIKDhWP-JFo_eBQ71OxTr5Y,261
3
3
  upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
4
4
  upgini/dataset.py,sha256=Nm2ZmwyQqvTnymYpGUwyJWy7y2ebXlHMyYmGeGcyA_s,31652
5
5
  upgini/errors.py,sha256=2b_Wbo0OYhLUbrZqdLIx5jBnAsiD1Mcenh-VjR4HCTw,950
6
- upgini/features_enricher.py,sha256=wC9hWu47gdn-dXs5yLHO9etjm3t7XVF-xpafF1gakWI,234470
6
+ upgini/features_enricher.py,sha256=s3anZTANdnK_3ff-78qYOf89q2q2AoV9_0VAjUaeDTo,234470
7
7
  upgini/http.py,sha256=-J_wOpnwVnT0ebPC6sOs6fN3AWtCD0LJLu6nlYmxaqk,44348
8
8
  upgini/metadata.py,sha256=H3wiN37k-yqWZgbPD0tJzx8DzaCIkgmX5cybhByQWLg,12619
9
9
  upgini/metrics.py,sha256=KCPE_apPN-9BIdv6GqASbJVaB_gBcy8wzNApAcyaGo4,46020
@@ -71,10 +71,10 @@ upgini/utils/sample_utils.py,sha256=xpfYaZ2cYP7I2JrcooVc13QNBFawB81cJRuh38451Q4,
71
71
  upgini/utils/sklearn_ext.py,sha256=Pcy8sWD6f4YcE5Bu0UmXD4j0ICmXtrT8DJlTArM-_a0,49356
72
72
  upgini/utils/sort.py,sha256=8uuHs2nfSMVnz8GgvbOmgMB1PgEIZP1uhmeRFxcwnYw,7039
73
73
  upgini/utils/target_utils.py,sha256=GCPn4QeJ83JJ_vyBJ3IhY5fyIRkLC9q9BE59S2FRO1I,10882
74
- upgini/utils/track_info.py,sha256=HAMk4d-TYd0szl4fo6Gczvh-sabj3jFcxCoJ19zsNAo,6056
74
+ upgini/utils/track_info.py,sha256=NDKeQTUlZaYp15UoP-xLKGoDoJQ0drbDMwB0g9R0PUg,6427
75
75
  upgini/utils/ts_utils.py,sha256=26vhC0pN7vLXK6R09EEkMK3Lwb9IVPH7LRdqFIQ3kPs,1383
76
76
  upgini/utils/warning_counter.py,sha256=-GRY8EUggEBKODPSuXAkHn9KnEQwAORC0mmz_tim-PM,254
77
- upgini-1.2.128a1.dist-info/METADATA,sha256=_P3GkmDolD-Q-FUcfMYMsCerxOWduvD6VqB3KfhDymo,51144
78
- upgini-1.2.128a1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
79
- upgini-1.2.128a1.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
80
- upgini-1.2.128a1.dist-info/RECORD,,
77
+ upgini-1.2.129.dist-info/METADATA,sha256=2aozj0PmbpF6Q0RnOObDK1ompytVW__7ks95a3TGkYQ,51142
78
+ upgini-1.2.129.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
79
+ upgini-1.2.129.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
80
+ upgini-1.2.129.dist-info/RECORD,,