upgini 1.2.128a1__py3-none-any.whl → 1.2.128a2__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.128a2"
@@ -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,8 +52,12 @@ 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
62
  print("Start getting track metrics")
58
63
  track = {"ide": _get_execution_ide()}
@@ -172,3 +177,26 @@ def get_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optiona
172
177
  track["ip"] = "0.0.0.0"
173
178
 
174
179
  return track
180
+
181
+
182
+ def get_track_metrics(client_ip: Optional[str] = None, client_visitorid: Optional[str] = None) -> dict:
183
+ key = (client_ip, client_visitorid)
184
+ with _inflight_lock:
185
+ event = _inflight_events.get(key)
186
+ if event is None:
187
+ event = Event()
188
+ _inflight_events[key] = event
189
+ is_owner = True
190
+ else:
191
+ is_owner = False
192
+
193
+ if not is_owner:
194
+ event.wait()
195
+ return _compute_track_metrics(client_ip, client_visitorid)
196
+
197
+ try:
198
+ return _compute_track_metrics(client_ip, client_visitorid)
199
+ finally:
200
+ with _inflight_lock:
201
+ event.set()
202
+ _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.128a2
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,4 +1,4 @@
1
- upgini/__about__.py,sha256=0IfOlHrvtIj9lMq5rIqaMXXHCEFy-5GmtuHRuC-AsAw,26
1
+ upgini/__about__.py,sha256=_OpjaS3aWOO85WitVLjNQSUylUYFyK_1TAmMgnhlbng,26
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
@@ -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=EoEbZ0zz3z_ofA2HbUvjg9fCiNjodX7Uokltgv2qTds,6820
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.128a2.dist-info/METADATA,sha256=ady6Ig3ZIQlXedS161H7y35Vl_Qmqjgl9hmgQbcMQ60,51144
78
+ upgini-1.2.128a2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
79
+ upgini-1.2.128a2.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
80
+ upgini-1.2.128a2.dist-info/RECORD,,