server: /load with backend=polars pages a random 1M-row sample, shuffled, when the file has more rows
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with buckaroo/server/data_loading_polars.py:40, buckaroo/dataflow/dataflow.py:420, and buckaroo/dataflow/dataflow_extras.py:68; trace how pre_stats_sample affects the dataflow's raw frame. Reproduce with the issue's 1.2M-row example and check the /load response. Done means the grid pages through the full frame in file order, while any stats sampling does not replace that frame.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
/load with backend: "polars" pages through a random 1M-row sample, in shuffled order, when the file has more than 1M rows. Every row request, sort and search runs against the sample.
PolarsServerSampling.pre_limit = 1_000_000 (buckaroo/server/data_loading_polars.py:40) reads as a cap on the stats input, but CustomizableDataflow.__init__ passes pre_stats_sample(orig_df) in as the dataflow's raw frame (buckaroo/dataflow/dataflow.py:420), and pre_stats_sample calls df.sample(pre_limit) (buckaroo/dataflow/dataflow_extras.py:68). The sample becomes the table.
import polars as pl
from buckaroo.server.data_loading_polars import create_polars_dataflow
flow = create_polars_dataflow(pl.DataFrame({"row": range(1_200_000)}))
_, processed, _ = flow.widget_args_tuple
print(len(processed)) # 1000000
print(processed["row"].head(5).to_list()) # e.g. [297452, 366261, 578517, 947309, 607234]
Over the server, POST /load on a 1.2M-row parquet answers rows: 1200000, the initial_state carries df_meta: {filtered_rows: 1000000, total_rows: 1200000}, and the first infinite_resp has length: 1000000 with the rows out of file order.
Impact
tallyman would like to hand its grid a parquet path through /load instead of a xorq build through /load_expr. Its entries routinely pass 1M rows (the largest is 78,024,179). Each would show a random slice of its rows, out of order, and the summary stats would describe that slice.
Suggested fix
- Keep the frame the grid pages through whole.
pre_limit = FalseonPolarsServerSamplingdoes that, and is whatXorqInfiniteSamplingalready uses. - If stats on very large frames need a cap, sample only what
DFStatsClassreads and mark the stats as sampled, rather than replacingraw_df.
Context
Found while checking whether tallyman's grid can move from /load_expr to /load with backend: "polars". Reproduced on buckaroo 0.15.8; the same code is on main at 992fdb3.
The other gaps from the same check: #993, #994, #995, #996.
- Lingua principale
- Python
- Stelle
- 685
- Fork
- 17
- Merge medio
- 1g 4h
- PR unite (30g)
- 29
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di buckaroo-data/buckaroo
-
Histograms JS
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
buckaroo-data/buckaroo#1089 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Histograms
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
buckaroo-data/buckaroo#1087 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Histograms
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
buckaroo-data/buckaroo#1086 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Histograms
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
buckaroo-data/buckaroo#1083 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Histograms
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
buckaroo-data/buckaroo#1082 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di buckaroo-data/buckaroo
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Deepak3699/Ai_Mentor#244 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
btclib-org/btclib-node#1880 ·
I maintainer di solito rispondono entro 1 giorno
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handledForse già presa @khuisman l’ha presa oggi. Apertav0.9.2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
khuisman/mcp-gee-sweet#941 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pyjanitor-devs/pyjanitor#1758 ·
I maintainer di solito rispondono entro 1 giorno
-
bug ready for review
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
odysseus-dev/odysseus#6641 ·
I maintainer di solito rispondono entro 1 giorno