upgini 1.1.132__py3-none-any.whl → 1.1.132a1__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/http.py +10 -15
- upgini/utils/track_info.py +0 -12
- {upgini-1.1.132.dist-info → upgini-1.1.132a1.dist-info}/METADATA +1 -1
- {upgini-1.1.132.dist-info → upgini-1.1.132a1.dist-info}/RECORD +7 -7
- {upgini-1.1.132.dist-info → upgini-1.1.132a1.dist-info}/LICENSE +0 -0
- {upgini-1.1.132.dist-info → upgini-1.1.132a1.dist-info}/WHEEL +0 -0
- {upgini-1.1.132.dist-info → upgini-1.1.132a1.dist-info}/top_level.txt +0 -0
upgini/http.py
CHANGED
|
@@ -32,7 +32,7 @@ from upgini.metadata import (
|
|
|
32
32
|
SearchCustomization,
|
|
33
33
|
)
|
|
34
34
|
from upgini.resource_bundle import bundle
|
|
35
|
-
from upgini.utils.track_info import
|
|
35
|
+
from upgini.utils.track_info import get_track_metrics
|
|
36
36
|
|
|
37
37
|
try:
|
|
38
38
|
from importlib_metadata import version
|
|
@@ -49,7 +49,6 @@ except ImportError:
|
|
|
49
49
|
UPGINI_URL: str = "UPGINI_URL"
|
|
50
50
|
UPGINI_API_KEY: str = "UPGINI_API_KEY"
|
|
51
51
|
DEMO_API_KEY: str = "Aa4BPwGFbn1zNEXIkZ-NbhsRk0ricN6puKuga1-O5lM"
|
|
52
|
-
TRACK_METRICS_TIMEOUT_SECONDS: int = 10
|
|
53
52
|
|
|
54
53
|
refresh_token_lock = threading.Lock()
|
|
55
54
|
|
|
@@ -356,7 +355,9 @@ class _RestClient:
|
|
|
356
355
|
digest = md5_hash.hexdigest()
|
|
357
356
|
metadata_with_md5 = metadata.copy(update={"checksumMD5": digest})
|
|
358
357
|
|
|
359
|
-
digest_sha256 = hashlib.sha256(
|
|
358
|
+
digest_sha256 = hashlib.sha256(
|
|
359
|
+
pd.util.hash_pandas_object(pd.read_parquet(file_path)).values
|
|
360
|
+
).hexdigest()
|
|
360
361
|
metadata_with_md5 = metadata_with_md5.copy(update={"digest": digest_sha256})
|
|
361
362
|
|
|
362
363
|
with open(file_path, "rb") as file:
|
|
@@ -375,11 +376,7 @@ class _RestClient:
|
|
|
375
376
|
search_customization.json(exclude_none=True).encode(),
|
|
376
377
|
"application/json",
|
|
377
378
|
)
|
|
378
|
-
files["tracking"] = (
|
|
379
|
-
"tracking.json",
|
|
380
|
-
dumps(get_track_metrics_with_timeout(TRACK_METRICS_TIMEOUT_SECONDS)).encode(),
|
|
381
|
-
"application/json",
|
|
382
|
-
)
|
|
379
|
+
files["tracking"] = ("tracking.json", dumps(get_track_metrics()).encode(), "application/json")
|
|
383
380
|
additional_headers = {self.SEARCH_KEYS_HEADER_NAME: ",".join(self.search_keys_meaning_types(metadata))}
|
|
384
381
|
|
|
385
382
|
return self._send_post_file_req_v2(
|
|
@@ -438,7 +435,9 @@ class _RestClient:
|
|
|
438
435
|
digest = md5_hash.hexdigest()
|
|
439
436
|
metadata_with_md5 = metadata.copy(update={"checksumMD5": digest})
|
|
440
437
|
|
|
441
|
-
digest_sha256 = hashlib.sha256(
|
|
438
|
+
digest_sha256 = hashlib.sha256(
|
|
439
|
+
pd.util.hash_pandas_object(pd.read_parquet(file_path)).values
|
|
440
|
+
).hexdigest()
|
|
442
441
|
metadata_with_md5 = metadata_with_md5.copy(update={"digest": digest_sha256})
|
|
443
442
|
|
|
444
443
|
with open(file_path, "rb") as file:
|
|
@@ -457,11 +456,7 @@ class _RestClient:
|
|
|
457
456
|
search_customization.json(exclude_none=True).encode(),
|
|
458
457
|
"application/json",
|
|
459
458
|
)
|
|
460
|
-
files["tracking"] = (
|
|
461
|
-
"ide",
|
|
462
|
-
dumps(get_track_metrics_with_timeout(TRACK_METRICS_TIMEOUT_SECONDS)).encode(),
|
|
463
|
-
"application/json",
|
|
464
|
-
)
|
|
459
|
+
files["tracking"] = ("ide", dumps(get_track_metrics()).encode(), "application/json")
|
|
465
460
|
|
|
466
461
|
additional_headers = {self.SEARCH_KEYS_HEADER_NAME: ",".join(self.search_keys_meaning_types(metadata))}
|
|
467
462
|
|
|
@@ -802,7 +797,7 @@ class BackendLogHandler(logging.Handler):
|
|
|
802
797
|
def task():
|
|
803
798
|
try:
|
|
804
799
|
if self.track_metrics is None:
|
|
805
|
-
self.track_metrics =
|
|
800
|
+
self.track_metrics = get_track_metrics()
|
|
806
801
|
if "ip" in self.track_metrics.keys():
|
|
807
802
|
self.hostname = self.track_metrics["ip"]
|
|
808
803
|
else:
|
upgini/utils/track_info.py
CHANGED
|
@@ -6,7 +6,6 @@ from functools import lru_cache
|
|
|
6
6
|
from getpass import getuser
|
|
7
7
|
from hashlib import sha256
|
|
8
8
|
from uuid import getnode
|
|
9
|
-
from concurrent import futures
|
|
10
9
|
|
|
11
10
|
from requests import get, post
|
|
12
11
|
|
|
@@ -46,17 +45,6 @@ def _get_execution_ide() -> str:
|
|
|
46
45
|
return "other"
|
|
47
46
|
|
|
48
47
|
|
|
49
|
-
def get_track_metrics_with_timeout(timeout_seconds: int = 10) -> dict:
|
|
50
|
-
with futures.ThreadPoolExecutor() as executor:
|
|
51
|
-
future = executor.submit(get_track_metrics)
|
|
52
|
-
try:
|
|
53
|
-
result = future.result(timeout_seconds)
|
|
54
|
-
return result
|
|
55
|
-
except futures.TimeoutError:
|
|
56
|
-
future.cancel()
|
|
57
|
-
return dict()
|
|
58
|
-
|
|
59
|
-
|
|
60
48
|
@lru_cache()
|
|
61
49
|
def get_track_metrics() -> dict:
|
|
62
50
|
# default values
|
|
@@ -3,7 +3,7 @@ upgini/ads.py,sha256=mre6xn44wcC_fg63iLT_kTh4mViZqR9AKRJZAtpQz8Y,2592
|
|
|
3
3
|
upgini/dataset.py,sha256=uiba8qC2RNvqka5MQp-XgdYDE7-nqO5FojMO5a0n_HA,42978
|
|
4
4
|
upgini/errors.py,sha256=BqpvfhW2jJW5fa5KXj0alhXatGl-WK4xTl309-QNLp8,959
|
|
5
5
|
upgini/features_enricher.py,sha256=iV9OHy8QFQdB5uUX6S2RuI28WBZFNkR5LZwRrhuB8Oo,118746
|
|
6
|
-
upgini/http.py,sha256=
|
|
6
|
+
upgini/http.py,sha256=rY9kRwqErjC8qewANiBhkPObek-Hrm9037KEyQ3vpfs,36191
|
|
7
7
|
upgini/metadata.py,sha256=Oefg-rkA4PsZUHIho_clZcnyZwdtVJ1gXPvEY6oBmpg,5969
|
|
8
8
|
upgini/metrics.py,sha256=5tQ_6ZKUM0EBLnHmKZD63KHCQXTYGeE-uFLs0wHcYf4,15477
|
|
9
9
|
upgini/search_task.py,sha256=cM-3cAcdnKHrCl7ZTqhHLrSkDVpdgowV5YBaFq2BzjY,13597
|
|
@@ -37,10 +37,10 @@ upgini/utils/format.py,sha256=Yv5cvvSs2bOLUzzNu96Pu33VMDNbabio92QepUj41jU,243
|
|
|
37
37
|
upgini/utils/phone_utils.py,sha256=JNSkF8G6mgsN8Czy11pamaJdsY6rBINEMpi7jbVt_RA,408
|
|
38
38
|
upgini/utils/postal_code_utils.py,sha256=_8CR9tBqsPptQsmMUvnrCAmBaMIQSWH3JfJ4ly3x_zs,409
|
|
39
39
|
upgini/utils/target_utils.py,sha256=3eHrDy_Dc9ozuOwHGnGA705m9glCxKmjB-DfLrflqiA,1370
|
|
40
|
-
upgini/utils/track_info.py,sha256=
|
|
40
|
+
upgini/utils/track_info.py,sha256=O_oL4gy1jH0DVgtiUeZAW0YKCeRT4B_bzH_SZYkFaOE,4076
|
|
41
41
|
upgini/utils/warning_counter.py,sha256=vnmdFo5-7GBkU2bK9h_uC0K0Y_wtfcYstxOdeRfacO0,228
|
|
42
|
-
upgini-1.1.
|
|
43
|
-
upgini-1.1.
|
|
44
|
-
upgini-1.1.
|
|
45
|
-
upgini-1.1.
|
|
46
|
-
upgini-1.1.
|
|
42
|
+
upgini-1.1.132a1.dist-info/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
|
43
|
+
upgini-1.1.132a1.dist-info/METADATA,sha256=wEsepCklPcYgAQM8PGSh9OB2Fu6I8qmKNYqQKl867Do,43229
|
|
44
|
+
upgini-1.1.132a1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
45
|
+
upgini-1.1.132a1.dist-info/top_level.txt,sha256=OFhTGiDIWKl5gFI49qvWq1R9IKflPaE2PekcbDXDtx4,7
|
|
46
|
+
upgini-1.1.132a1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|