rapidsegment 1.2.6__tar.gz → 1.2.7__tar.gz

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.
Files changed (26) hide show
  1. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/PKG-INFO +1 -1
  2. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/pyproject.toml +1 -1
  3. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/pyproject.toml.orig +1 -1
  4. rapidsegment-1.2.7/src/rapidsegment/ui/.streamlit/config.toml +3 -0
  5. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/pages/1_Data_Loader.py +15 -10
  6. rapidsegment-1.2.6/src/rapidsegment/ui/.streamlit/config.toml +0 -7
  7. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/LICENSE +0 -0
  8. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/README.md +0 -0
  9. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/__init__.py +0 -0
  10. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/builder.py +0 -0
  11. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/py.typed +0 -0
  12. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/scorer.py +0 -0
  13. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/__init__.py +0 -0
  14. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/_exit.py +0 -0
  15. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/_theme.py +0 -0
  16. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/app.py +0 -0
  17. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/pages/2_Workbench.py +0 -0
  18. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/pages/3_Execution_Console.py +0 -0
  19. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/pages/4_Results_Dashboard.py +0 -0
  20. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/pages/5_Leaderboard.py +0 -0
  21. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/pages/6_Arena.py +0 -0
  22. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/ui/pages/__init__.py +0 -0
  23. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/utils/__init__.py +0 -0
  24. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/utils/data_loader.py +0 -0
  25. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/utils/on_gcp_feature_selection.py +0 -0
  26. {rapidsegment-1.2.6 → rapidsegment-1.2.7}/src/rapidsegment/utils/undersampler.sql +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rapidsegment
3
- Version: 1.2.6
3
+ Version: 1.2.7
4
4
  Summary: A fast, multi-segment population scoring and combinatorial heuristic rule extraction engine.
5
5
  Author: Bishwarup Biswas
6
6
  Author-email: Bishwarup Biswas <bishwarup1429@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rapidsegment"
3
- version = "1.2.6"
3
+ version = "1.2.7"
4
4
  description = "A fast, multi-segment population scoring and combinatorial heuristic rule extraction engine."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rapidsegment"
3
- version = "1.2.6"
3
+ version = "1.2.7"
4
4
  description = "A fast, multi-segment population scoring and combinatorial heuristic rule extraction engine."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -0,0 +1,3 @@
1
+ [server]
2
+ maxUploadSize = 2000
3
+ maxMessageSize = 2000
@@ -8,8 +8,10 @@ Run with: streamlit run Module_1_data_loader.py
8
8
  """
9
9
  import json
10
10
  import os
11
+ import shutil
11
12
  import tempfile
12
13
 
14
+ import pyarrow.csv as pa_csv
13
15
  import duckdb
14
16
  import pandas as pd
15
17
  import plotly.graph_objects as go
@@ -35,7 +37,7 @@ def active_db():
35
37
  goes through this so DuckDB sees the actual changed types, not just the UI.
36
38
  """
37
39
  return DB_FILE_MOD if os.path.exists(DB_FILE_MOD) else DB_FILE
38
- MAX_UPLOAD_MB = 500
40
+ MAX_UPLOAD_MB = 2000
39
41
  SAMPLE_NAMES = ["bank-full.csv", "train.csv"]
40
42
 
41
43
  NUMERIC = {"INTEGER", "BIGINT", "DOUBLE", "FLOAT", "DECIMAL", "REAL",
@@ -167,7 +169,7 @@ def materialize_modified(positive_value=None):
167
169
  st.session_state["target_col"] = new_target
168
170
  st.session_state["tinfo"] = None
169
171
  st.session_state["data_modified"] = True
170
- st.success("✅ Modified dataset written to `module1_data_modified.duckdb` and is now active.")
172
+ st.success("☑️ Modified dataset written to `module1_data_modified.duckdb` and is now active.")
171
173
  rerun()
172
174
 
173
175
 
@@ -197,7 +199,9 @@ def detect_format(name):
197
199
  def load_file_udl(path, encoding="Auto-detect"):
198
200
  ext = os.path.splitext(path)[1].lower()
199
201
  if encoding != "Auto-detect" and ext == ".csv":
200
- return UniversalDataLoader().load(fallback_data=pd.read_csv(path, encoding=encoding))
202
+ enc = {"UTF-8": "utf8", "Latin-1": "latin1"}.get(encoding, "utf8")
203
+ table = pa_csv.read_csv(path, read_options=pa_csv.ReadOptions(encoding=enc))
204
+ return UniversalDataLoader().load(fallback_data=table)
201
205
  try:
202
206
  return UniversalDataLoader(file_path=path).load()
203
207
  except Exception:
@@ -205,7 +209,8 @@ def load_file_udl(path, encoding="Auto-detect"):
205
209
  last = None
206
210
  for enc in ("utf-8", "latin-1"):
207
211
  try:
208
- return UniversalDataLoader().load(fallback_data=pd.read_csv(path, encoding=enc))
212
+ table = pa_csv.read_csv(path, read_options=pa_csv.ReadOptions(encoding=enc))
213
+ return UniversalDataLoader().load(fallback_data=table)
209
214
  except Exception as exc:
210
215
  last = exc
211
216
  if last is not None:
@@ -330,7 +335,7 @@ with st.sidebar:
330
335
  tmp_path = None
331
336
  try:
332
337
  with tempfile.NamedTemporaryFile(suffix=ext, delete=False) as tmp:
333
- tmp.write(uploaded.getvalue())
338
+ shutil.copyfileobj(uploaded, tmp)
334
339
  tmp_path = tmp.name
335
340
  progress = st.progress(0, text="Loading…")
336
341
  data = load_file_udl(tmp_path, encoding)
@@ -578,7 +583,7 @@ with tab_quality:
578
583
  .sort_values("null_pct", ascending=False)
579
584
  .rename(columns={"column_name": "Column", "null_pct": "Null %"}))
580
585
  if null_df.empty:
581
- st.success("✅ No missing values — data ready for segmentation ✓")
586
+ st.success("☑️ No missing values — data ready for segmentation ✓")
582
587
  else:
583
588
  st.warning(f"⚠️ {len(null_df)} column(s) have missing values (worst offenders first)")
584
589
  null_df["Null %"] = null_df["Null %"].apply(lambda x: f"{x:.1f}%")
@@ -587,7 +592,7 @@ with tab_quality:
587
592
  warns = build_metadata(summ)
588
593
  warns = warns[warns["Warning"] != "✓"]
589
594
  if warns.empty:
590
- st.success("✅ No type warnings — data ready for segmentation ✓")
595
+ st.success("☑️ No type warnings — data ready for segmentation ✓")
591
596
  else:
592
597
  st.warning(f"⚠️ {len(warns)} column(s) flagged with type/cardinality warnings")
593
598
 
@@ -629,7 +634,7 @@ with tab_meta:
629
634
  if st.button("Apply metadata & create modified dataset", type="primary"):
630
635
  materialize_modified()
631
636
  if os.path.exists(DB_FILE_MOD):
632
- st.success("✅ Modified dataset is active.")
637
+ st.success("☑️ Modified dataset is active.")
633
638
  if st.button("Discard modified dataset (revert to raw)"):
634
639
  try:
635
640
  os.remove(DB_FILE_MOD)
@@ -709,7 +714,7 @@ with tab_target:
709
714
  if info:
710
715
  st.divider()
711
716
  if info["is_binary"]:
712
- st.success(f"✅ Binary column — encoding: **{info['binary_label']}**")
717
+ st.success(f"☑️ Binary column — encoding: **{info['binary_label']}**")
713
718
  er = info["event_rate"]
714
719
  if er is not None:
715
720
  bad = er < 0.01 or er > 0.99
@@ -718,7 +723,7 @@ with tab_target:
718
723
  if bad:
719
724
  col_b.warning("⚠️ Severe class imbalance — outside 1%–99%")
720
725
  else:
721
- col_b.success("✅ Event rate in healthy range")
726
+ col_b.success("☑️ Event rate in healthy range")
722
727
  else:
723
728
  st.warning(f"⚠️ Multi-class — {info['n_distinct']} distinct values. Use the binarization helper below.")
724
729
 
@@ -1,7 +0,0 @@
1
- [theme]
2
- base = "dark"
3
- backgroundColor = "#000000"
4
- secondaryBackgroundColor = "#03150E"
5
- primaryColor = "#34D399"
6
- textColor = "#6EE7B7"
7
- font = "monospace"
File without changes
File without changes