Server-side subsample: extract at most N points from field_data and solution_variable_data (SVARs)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by tracing SurfaceFieldDataRequest and fields.field_data, then inspect fields.solution_variable_data.get_data and their tests to understand how data is extracted and streamed. The issue proposes optional sampling for both paths, with a configurable size and possibly seed and method; define behavior that returns at most N points while preserving the current full-data default, then verify both extraction paths.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
❓ Problem statement
For large cases, clients often need only a random (or stratified) sample of N points for downstream work (e.g. ML inference), but today both APIs force a full-zone transfer, then the user must subsample in NumPy.
1. fields.field_data / SurfaceFieldDataRequest (e.g. SurfaceDataType.Vertices)
- Every requested surface zone returns all vertices.
- On cases with many wall zones (or very large walls), full extract can be slow, memory-heavy, or destabilize Fluent (e.g. cortex faults) even when only N points are needed afterward.
2. fields.solution_variable_data.get_data (SVARs, e.g. SV_CENTROID)
- For huge fluid zones (O(1e8) cells), the payload is multi‑GB.
- In practice the gRPC stream can fail or return incomplete/
None-like data, so clients cannot even reach a post-hocnp.random.choicesubsample.
Why current behavior is insufficient
- Over-fetch: API always materializes the full array client-side.
- No server-side N: there is no first-class
n_max/sample_size/strideon these requests. - Fragile at scale: full
SV_CENTROIDfor main fluid zones is often the blocker for production workflows that only need a representative sample.
We need the sample to be taken in Fluent (or on the nodes) before/during streaming, not after a successful full download.
To reproduce :
vol = solver.fields.solution_variable_data.get_data(
variable_name="SV_CENTROID",
zone_names=[z],
domain_name=domain,
)[z]
pts = np.asarray(vol).reshape(-1, 3) # fails or OOMs on huge zones
💡 Proposed solution
Add optional server-side sampling to both extract paths so the client can request at most N points (default: current behavior = all).
A. Field data (surfaces)
Extend SurfaceFieldDataRequest (and/or get_field_data) with something like:
SurfaceFieldDataRequest(
surfaces=[...],
data_types=[SurfaceDataType.Vertices], # and ideally FaceCentroids later
sample_size=1_000_000, # or n_max=
sample_seed=42, # optional, for reproducibility
sample_method="random", # or "stride" / "uniform"
)
- Lingua principale
- Python
- Stelle
- 550
- Fork
- 86
- Merge medio
- 2g 1h
- PR unite (30g)
- 58
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 ansys/pyfluent
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
ansys/pyfluent#5515 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
[DOC]: DOE_ML: Update the keras model definition to match the supported APIForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[DOC]: Lunar Lander Outdated APIForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ansys/pyfluent
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Pantheon-Security/medusa#24 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
docs(notation): the ipa_to_arpa section does not name the tied and non-syllabic diphthong formsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
TigreGotico/scriptconv#445 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
TigreGotico/phoonnx#1045 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 2 giorni