nvidia/udf-judge-conversion
Reviews generated UDF tests and GPU/SQL implementations for robustness, anti-cheating, and GPU execution integrity. Use when the user requests a judge/review-agent pass, or when manually reviewing a completed conversion.
npx skills add https://github.com/NVIDIA/cudf-spark --skill udf-judge-conversion
Review a completed UDF conversion and its tests as a skeptical QA/code-review subagent.
Your job is to review whether the GPU/SQL implementation is a properly validated functional replacement for the CPU UDF.
Review the files that exist in the generated project:
src/main/<java|scala>/com/udf/src/test/scala/com/udf/UnitTest.scalasrc/test/scala/com/udf/CudfComparisonTest.scala or SqlComparisonTest.scalaThe unit test should be a strong specification of the CPU UDF behavior over its documented input domain.
Check that:
assertUDFResults path are mirrored in the comparison test and run against both CPU and GPU/SQL paths.The comparison test should provide strong evidence that the converted implementation preserves the CPU UDF behavior.
Check that:
Fail the review if the implementation is tailored to the tests instead of implementing the UDF generally. Look for:
Fail the review if the implementation silently performs logic row-by-row on the CPU. Look for:
copyToHost(), cudaMemcpyDeviceToHost, or row-by-row scalar copies such as getJavaString to copy input data to the CPU.If a GPU API's behavior is unclear, inspect the implementation or docs for the SQL/cuDF/libcudf/thrust APIs invoked by the UDF. Clone the matching source if needed to understand subtle null, type, boundary, or semantic behavior under the hood.
Start with a clear verdict:
PASS: no blocking issues foundFAIL: one or more blocking issues foundPASS: The unit test covers normal inputs plus meaningful edge cases, coverage gaps are explained, the comparison test runs the same cases through CPU and GPU/SQL paths, the implementation is general, and there are no hidden CPU fallbacks or test-derived literals.
PASS with non-blocking risks: One malformed-input assertion is commented out because the CPU throws a row-level exception while the GPU path returns null for that row, and comments explain the attempted fixes and why the behavior is outside the supported GPU contract. The normal input domain and core UDF logic are still fully tested.
FAIL: A test for the primary transformation is commented out, most assertions only check row counts or non-null output, or the comparison test leaves extra CPU-only unit tests unmatched. These failures weaken confidence even if comments are present.
FAIL: The implementation contains test-specific literals, dispatches on exact test rows, calls the CPU UDF from the GPU/SQL path, or copies column data to the host to perform normal business logic.
For failures, concisely list specific findings with:
Also include any non-blocking risks or test gaps separately.
Take nvidia/udf-judge-conversion from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.