Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
84021ad
feat: scaffold cudf executor skeleton
lmeyerov Nov 19, 2025
3aca848
feat: wire same-path plan into cudf executor
lmeyerov Nov 19, 2025
953d0f4
feat: add gfql where metadata and planner
lmeyerov Nov 19, 2025
8131245
feat: implement cudf executor forward pass
lmeyerov Nov 19, 2025
4b36220
test: add cudf forward parity cases
lmeyerov Nov 19, 2025
40f817d
docs: copy issue 837 plan into impl folder
lmeyerov Nov 19, 2025
e1535b1
chore: remove tracked cudf executor plan
lmeyerov Nov 20, 2025
f5c3eea
feat: add oracle fallback for cudf same-path executor
lmeyerov Nov 20, 2025
41b71c1
chore: gate cudf same-path executor and add strict-mode test
lmeyerov Nov 20, 2025
58f1a4b
chore: document cuDF same-path fallback gating
lmeyerov Nov 20, 2025
ade970f
feat: add same-path pruning for cudf executor
lmeyerov Nov 20, 2025
9c83bff
feat: route cudf chains with WHERE to same-path executor
lmeyerov Nov 20, 2025
277e3f5
feat: enforce same-path summaries in cudf executor
lmeyerov Nov 20, 2025
d40c361
fix(gfql): preserve edge filters in cudf same-path
lmeyerov Nov 22, 2025
81e058b
chore(gfql): fix same-path typing and mypy config
lmeyerov Nov 22, 2025
4e08fc4
chore(gfql): clean chain typing imports
lmeyerov Nov 22, 2025
48d82c9
chore(gfql): silence dtype comparisons for mypy 3.8
lmeyerov Nov 22, 2025
076b96e
test(gfql): cover same-path cycles, branches, edge filters, cudf
lmeyerov Nov 23, 2025
a94021d
test(gfql): compress same-path topology coverage
lmeyerov Nov 23, 2025
1a910b6
chore(gfql): tighten inequality mask
lmeyerov Nov 23, 2025
ed8b1f4
test(gfql): add dispatch same-path dict case
lmeyerov Nov 23, 2025
4cf85dd
test(gfql): add chain/list dispatch same-path parity
lmeyerov Nov 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pypirc
# Distribution / packaging
.Python
env/
.venv/
build/
develop-eggs/
dist/
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Added
- **GFQL / Oracle**: Introduced `graphistry.gfql.ref.enumerator`, a pandas-only reference implementation that enumerates fixed-length chains, enforces local + same-path predicates, applies strict null semantics, enforces safety caps, and emits alias tags/optional path bindings for use as a correctness oracle.
- **GFQL / cuDF same-path**: Added execution-mode gate `GRAPHISTRY_CUDF_SAME_PATH_MODE` (auto/oracle/strict) for GFQL cuDF same-path executor. Auto falls back to oracle when GPU unavailable; strict requires cuDF or raises. Oracle path retains safety caps and alias-tag propagation.
- **GFQL / cuDF executor**: Implemented same-path pruning path (wavefront backward filtering, min/max summaries for inequalities, value-aware equality filters) with oracle fallback. CUDF chains with WHERE now dispatch through the same-path executor.

### Tests
- **GFQL**: Added deterministic + property-based oracle tests (triangles, alias reuse, cuDF conversions, Hypothesis) plus parity checks ensuring pandas GFQL chains match the oracle outputs.
- **GFQL / cuDF same-path**: Added strict/auto mode coverage for cuDF executor fallback behavior to keep CI stable while GPU kernels are wired up.
- **GFQL / cuDF same-path**: Added GPU-path parity tests (equality/inequality) over CPU data to guard semantics while GPU CI remains unavailable.
- **Layouts**: Added comprehensive test coverage for `circle_layout()` and `group_in_a_box_layout()` with partition support (CPU/GPU)

## [0.45.9 - 2025-11-10]
Expand Down
27 changes: 24 additions & 3 deletions graphistry/compute/chain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
# ruff: noqa: E501
from typing import Dict, Union, cast, List, Tuple, Sequence, Optional, TYPE_CHECKING
from graphistry.Engine import Engine, EngineAbstract, df_concat, df_to_engine, resolve_engine

Expand All @@ -11,6 +12,11 @@
from .typing import DataFrameT
from .util import generate_safe_column_name
from graphistry.compute.validate.validate_schema import validate_chain_schema
from graphistry.gfql.same_path_types import (
WhereComparison,
parse_where_json,
where_to_json,
)

if TYPE_CHECKING:
from graphistry.compute.exceptions import GFQLSchemaError, GFQLValidationError
Expand All @@ -23,8 +29,13 @@

class Chain(ASTSerializable):

def __init__(self, chain: List[ASTObject]) -> None:
def __init__(
self,
chain: List[ASTObject],
where: Optional[Sequence[WhereComparison]] = None,
) -> None:
self.chain = chain
self.where = list(where or [])

def validate(self, collect_all: bool = False) -> Optional[List['GFQLValidationError']]:
"""Override to collect all chain validation errors."""
Expand Down Expand Up @@ -114,7 +125,14 @@ def from_json(cls, d: Dict[str, JSONVal], validate: bool = True) -> 'Chain':
f"Chain field must be a list, got {type(d['chain']).__name__}"
)

out = cls([ASTObject_from_json(op, validate=validate) for op in d['chain']])
where_raw = d.get('where')
where = parse_where_json(
cast(Optional[Sequence[Dict[str, Dict[str, str]]]], where_raw)
)
out = cls(
[ASTObject_from_json(op, validate=validate) for op in d['chain']],
where=where,
)
if validate:
out.validate()
return out
Expand All @@ -125,10 +143,13 @@ def to_json(self, validate=True) -> Dict[str, JSONVal]:
"""
if validate:
self.validate()
return {
data: Dict[str, JSONVal] = {
'type': self.__class__.__name__,
'chain': [op.to_json() for op in self.chain]
}
if self.where:
data['where'] = where_to_json(self.where)
return data

def validate_schema(self, g: Plottable, collect_all: bool = False) -> Optional[List['GFQLSchemaError']]:
"""Validate this chain against a graph's schema without executing.
Expand Down
Loading
Loading