Commit ·
3efae5d
1
Parent(s): 916755e
ci: support macOS core development
Browse filesFiles changed (6)
33 unmodified lines34353637383933 unmodified lines- run: uv sync --dev- run: uv run pytestpackage:name: packageruns-on: ubuntu-latest33 unmodified lines34353637383940414243444546474849505133 unmodified lines- run: uv sync --dev- run: uv run pytesttest-macos:name: test (macOS core)runs-on: macos-14steps:- uses: actions/checkout@v4- uses: astral-sh/setup-uv@v6with:version: "0.8.x"enable-cache: true- run: uv sync --dev- run: uv run pytest tests/unit tests/integration -m "not gpu"package:name: packageruns-on: ubuntu-latest
18 unmodified lines192021222324252627282930313233343536373818 unmodified lines## InstallationThe supported development environment is Python 3.12 (`>=3.12,<3.13`), withPyTorch 2.2.2 and the optional ROOT-GNN stack DGL 2.4.0. The canonical setupis:```bashuv sync --dev --extra root-gnn```The core package can be installed without DGL when only shared data or taskcode is needed. ROOT-GNN models, graph construction, and ROOT-GNN parity testsrequire the `root-gnn` extra. The DGL extra uses the validated CUDA 12.1 wheelsource configured in `pyproject.toml`; a compatible NVIDIA driver is stillrequired. Do not add site-specific CUDA, Slurm, or filesystem paths to modelor task configuration.## Quick start18 unmodified lines19202122232425262728293031323334353637383940414218 unmodified lines## InstallationThe supported development environment is Python 3.12 (`>=3.12,<3.13`). Coredevelopment is supported on macOS and Linux:```bash# macOS (Apple Silicon): core package development and CPU testsuv sync --dev# Linux x86_64 with an NVIDIA GPU: validated ROOT-GNN developmentuv sync --dev --extra root-gnn```The core package can be installed without DGL when only shared data or taskcode is needed. ROOT-GNN models, graph construction, and ROOT-GNN parity testsrequire the `root-gnn` extra on Linux x86_64. That extra uses the validatedCUDA 12.1 wheel sources configured in `pyproject.toml`; a compatible NVIDIAdriver is still required. On macOS, use the core environment for shared code,configuration, linting, and tests that do not require DGL or CUDA. Do not addsite-specific CUDA, Slurm, or filesystem paths to model or task configuration.## Quick start
18 unmodified lines19202122232418 unmodified linesGNN4COLLIDERS_ROOT_FIXTURE=/path/to/reduced.root uv run pytest -m real_data -v```Unit tests use deterministic, small tensors and generated ROOT files. DGL,ONNX, CUDA, distributed execution, and reduced real-data fixtures remainoptional layers. Tests should assert public contracts and scientific18 unmodified lines1920212223242526272818 unmodified linesGNN4COLLIDERS_ROOT_FIXTURE=/path/to/reduced.root uv run pytest -m real_data -v```On macOS, use `uv sync --dev` and run the shared-package tests. ROOT-GNN,CUDA, and the required ROOT-GNN parity gate are validated on Linux x86_64 withthe `root-gnn` extra installed.Unit tests use deterministic, small tensors and generated ROOT files. DGL,ONNX, CUDA, distributed execution, and reduced real-data fixtures remainoptional layers. Tests should assert public contracts and scientific
18 unmodified lines1920212223242524 unmodified lines50515253545556575859606118 unmodified lines[project.optional-dependencies]root-gnn = ["dgl==2.4.0+cu121",]onnx = ["onnx>=1.16,<2",24 unmodified lines"gnn4colliders.configs" = ["*.yaml", "*/*.yaml", "*/*/*.yaml"][tool.uv.sources]torch = { index = "pytorch-cu121" }dgl = { index = "dgl" }[tool.uv]environments = ["sys_platform == 'linux' and platform_machine == 'x86_64' and python_full_version >= '3.12' and python_full_version < '3.13'",][[tool.uv.index]]18 unmodified lines1920212223242524 unmodified lines505152535455565758596018 unmodified lines[project.optional-dependencies]root-gnn = ["dgl==2.4.0+cu121; sys_platform == 'linux' and platform_machine == 'x86_64'",]onnx = ["onnx>=1.16,<2",24 unmodified lines"gnn4colliders.configs" = ["*.yaml", "*/*.yaml", "*/*/*.yaml"][tool.uv.sources]torch = [{ index = "pytorch-cu121", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },]dgl = [{ index = "dgl", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },][[tool.uv.index]]
1234567import torchfrom gnn4colliders.graphs import build_dgl_graphdef test_build_dgl_graph_attaches_compatible_features():node_features = torch.tensor(12345678910import pytestimport torchfrom gnn4colliders.graphs import build_dgl_graphpytest.importorskip("dgl")def test_build_dgl_graph_attaches_compatible_features():node_features = torch.tensor(
.github/workflows/ci.yml+12
README.md+11-7
docs/testing.md+4
pyproject.toml+6-7
tests/unit/graphs/test_dgl_graph.py+3
uv.lock