tdfs4ds 0.2.4.36__py3-none-any.whl → 0.2.4.38__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.
- tdfs4ds/__init__.py +30 -10
- {tdfs4ds-0.2.4.36.dist-info → tdfs4ds-0.2.4.38.dist-info}/METADATA +1 -1
- {tdfs4ds-0.2.4.36.dist-info → tdfs4ds-0.2.4.38.dist-info}/RECORD +5 -5
- {tdfs4ds-0.2.4.36.dist-info → tdfs4ds-0.2.4.38.dist-info}/WHEEL +0 -0
- {tdfs4ds-0.2.4.36.dist-info → tdfs4ds-0.2.4.38.dist-info}/top_level.txt +0 -0
tdfs4ds/__init__.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
__version__ = '0.2.4.
|
|
1
|
+
__version__ = '0.2.4.38'
|
|
2
2
|
import logging
|
|
3
|
+
import json
|
|
3
4
|
|
|
4
5
|
# Setup the logger
|
|
5
6
|
logging.basicConfig(
|
|
@@ -754,24 +755,41 @@ def _upload_features(
|
|
|
754
755
|
|
|
755
756
|
logger_safe("info", "FilterManager detected: %s filters to process", filtermanager.nb_filters)
|
|
756
757
|
something_computed = False
|
|
757
|
-
|
|
758
|
+
pbar = tqdm(
|
|
758
759
|
range(filtermanager.nb_filters),
|
|
759
760
|
total=filtermanager.nb_filters,
|
|
760
761
|
desc="Applying filters",
|
|
761
762
|
unit="filter",
|
|
762
763
|
leave=False
|
|
763
|
-
)
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
for i in pbar:
|
|
764
767
|
filter_id = i + 1
|
|
765
768
|
filtermanager.update(filter_id)
|
|
766
769
|
|
|
767
|
-
# show which filter is being applied in the bar
|
|
768
770
|
try:
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
771
|
+
pbar.set_description(f"Applying filter {filter_id}/{filtermanager.nb_filters}")
|
|
772
|
+
|
|
773
|
+
# Convert datetime columns to string
|
|
774
|
+
df_bar = filtermanager.display().to_pandas().astype(object) # avoid conversion issues
|
|
775
|
+
for col in df_bar.select_dtypes(include=["datetime", "datetimetz"]).columns:
|
|
776
|
+
df_bar[col] = df_bar[col].dt.strftime("%Y-%m-%d %H:%M:%S")
|
|
777
|
+
|
|
778
|
+
# Convert to JSON object (dict)
|
|
779
|
+
bar_info = df_bar.iloc[0].to_dict()
|
|
780
|
+
|
|
781
|
+
# ---- ADD THIS: handle python date objects ----
|
|
782
|
+
from datetime import date, datetime
|
|
783
|
+
for key, value in bar_info.items():
|
|
784
|
+
if isinstance(value, (date, datetime)): # convert date/datetime to string
|
|
785
|
+
bar_info[key] = value.strftime("%Y-%m-%d %H:%M:%S")
|
|
786
|
+
# ----------------------------------------------
|
|
787
|
+
|
|
788
|
+
bar_info = str(bar_info)
|
|
789
|
+
if len(bar_info) > 120:
|
|
790
|
+
bar_info = bar_info[:117] + "..."
|
|
791
|
+
pbar.set_postfix_str(bar_info)
|
|
792
|
+
|
|
775
793
|
except Exception:
|
|
776
794
|
# postfix is optional; ignore errors from display() here
|
|
777
795
|
pass
|
|
@@ -792,7 +810,9 @@ def _upload_features(
|
|
|
792
810
|
"Skipping computation for process_id=%s at time %s (already exists, force_compute=False)",
|
|
793
811
|
process_id, tdfs4ds.FEATURE_STORE_TIME
|
|
794
812
|
)
|
|
813
|
+
pbar.colour = "green"
|
|
795
814
|
if do_compute or force_compute:
|
|
815
|
+
pbar.colour = "blue"
|
|
796
816
|
tdfs4ds.process_store.process_followup.followup_open(
|
|
797
817
|
run_id = tdfs4ds.RUN_ID,
|
|
798
818
|
process_type = tdfs4ds.PROCESS_TYPE,
|
|
@@ -2,7 +2,7 @@ tdfs/__init__.py,sha256=7AcO7uB1opRCt7t2JOHworKimfAaDeO3boRW7u9Geo8,23
|
|
|
2
2
|
tdfs/datasets.py,sha256=-b2MPEKGki2V1M8iUcoDR9uc2krIK7u1CK-EhChvihs,985
|
|
3
3
|
tdfs/feature_store.py,sha256=Honu7eOAXxP4Ivz0mRlhuNkfTDzgZl5HB1WlQUwzcZ0,31354
|
|
4
4
|
tdfs/data/curves.csv,sha256=q0Tm-0yu7VMK4lHvHpgi1LMeRq0lO5gJy2Q17brKbEM,112488
|
|
5
|
-
tdfs4ds/__init__.py,sha256=
|
|
5
|
+
tdfs4ds/__init__.py,sha256=vOFDL9B3mamt3Cd6ponz4EpZ4BkTBmYFAoxXIkL7CqE,60855
|
|
6
6
|
tdfs4ds/datasets.py,sha256=LE4Gn0muwdyrIrCrbkE92cnafUML63z1lj5bFIIVzmc,3524
|
|
7
7
|
tdfs4ds/feature_engineering.py,sha256=oVnZ2V_XNGE12LKC_fNfkrWSQZLgtYRmaf8Dispi6S4,7081
|
|
8
8
|
tdfs4ds/feature_store.py,sha256=y-oItPZw6nBkBcGAceaATZbkLPTsvpk0OnpzTxYofDs,68576
|
|
@@ -32,7 +32,7 @@ tdfs4ds/utils/lineage.py,sha256=gy5M42qy5fvdWmlohAY3WPYoqAyp5VakeEmeT1YjrJQ,3783
|
|
|
32
32
|
tdfs4ds/utils/query_management.py,sha256=nAcE8QY1GWAKgOtb-ubSfDVcnYbU7Ge8CruVRLoPtmY,6356
|
|
33
33
|
tdfs4ds/utils/time_management.py,sha256=asIWvK5K81NNwAGqC-9Tv4Timscxyv0vyuPFs01whu0,31461
|
|
34
34
|
tdfs4ds/utils/visualization.py,sha256=5S528KoKzzkrAdCxfy7ecyqKvAXBoibNvHwz_u5ISMs,23167
|
|
35
|
-
tdfs4ds-0.2.4.
|
|
36
|
-
tdfs4ds-0.2.4.
|
|
37
|
-
tdfs4ds-0.2.4.
|
|
38
|
-
tdfs4ds-0.2.4.
|
|
35
|
+
tdfs4ds-0.2.4.38.dist-info/METADATA,sha256=pQ1JgtC75eThV0c0tnNXblLCvIhWz5GQHmCLDmX_de8,14326
|
|
36
|
+
tdfs4ds-0.2.4.38.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
37
|
+
tdfs4ds-0.2.4.38.dist-info/top_level.txt,sha256=wMyVkMvnBn8RRt1xBveGQxOpWFijPMPkMiE7G2mi8zo,8
|
|
38
|
+
tdfs4ds-0.2.4.38.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|