-
Notifications
You must be signed in to change notification settings - Fork 3
feat(dfanalyzer): integration of bridge module, exact-interval reindex, cat normalization #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hariharan-devarajan
merged 1 commit into
llnl:develop
from
rayandrew:feat/dfanalyzer-integration
May 21, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| DFAnalyzer Module | ||
| ================= | ||
|
|
||
| The ``dftracer.utils.dfanalyzer`` module bridges the C++ aggregation index to | ||
| `dfanalyzer <https://github.com/hariharan-devarajan/dfanalyzer>`_. It provides | ||
| the index-build, Arrow-IPC marshalling, and distributed high-level-metrics | ||
| (HLM) helpers that dfanalyzer drives over a Dask cluster. | ||
|
|
||
| These helpers only depend on the :class:`~dftracer.utils.Indexer` and the Arrow | ||
| plumbing, so they live in ``dftracer-utils`` rather than being vendored inside | ||
| dfanalyzer. | ||
|
|
||
| Dask is an optional dependency -- the distributed helpers require | ||
| ``dask.distributed`` to be installed. | ||
|
|
||
| Index Building | ||
| -------------- | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.resolve_trace_inputs | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.index_path_for | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.build_index_distributed | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.ensure_index | ||
|
|
||
| Arrow IPC Marshalling | ||
| --------------------- | ||
|
|
||
| The C extension yields Arrow data as PyCapsules. These helpers convert between | ||
| capsules, Arrow IPC byte streams (the wire format moved between Dask workers), | ||
| and pandas frames. | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.batches_to_ipc | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.ipc_to_pandas | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.scan_to_ipc | ||
|
|
||
| Distributed High-Level Metrics | ||
| ------------------------------ | ||
|
|
||
| The HLM pipeline aggregates the per-worker aggregation column family into a | ||
| Dask DataFrame. Each worker owns a disjoint PID set, so per-worker partials | ||
| have disjoint keys and need no cross-worker merge. | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.distributed_hlm | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.worker_hlm_partial | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.make_empty_hlm | ||
|
|
||
| View Groupby Partials | ||
| --------------------- | ||
|
|
||
| These helpers implement mergeable per-partition view aggregation: each | ||
| partition emits partial aggregates (sum, count, min, max, sum-of-squares) that | ||
| are combined and finalized into mean/std without a global shuffle. | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.partial_arrow_view_groupby | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.finalize_view_partials | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.build_partial_meta | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.build_final_meta | ||
|
|
||
| Dtype Coercion | ||
| -------------- | ||
|
|
||
| Utilities that normalize Arrow-backed dtypes into the pandas-native dtypes | ||
| expected by dfanalyzer's downstream ``metrics.py``. | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.normalize_arrow_dtypes | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.coerce_arrow_numerics_to_pandas_native | ||
|
|
||
| .. autofunction:: dftracer.utils.dfanalyzer.coerce_profile_dtypes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.