Skip to content

Fix cache-derived maxPartitionBytes recommendations - #2124

Merged
parthosa merged 10 commits into
NVIDIA:devfrom
parthosa:fix/cache-derived-max-partition-bytes
Aug 31, 2026
Merged

parthosa merged 10 commits into
NVIDIA:devfrom
parthosa:fix/cache-derived-max-partition-bytes

Conversation

@parthosa

@parthosa parthosa commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2122

Summary

  • Derive spark.sql.files.maxPartitionBytes only from final, non-cache datasource scan stages.
  • Share the provenance-aware input selector between qualification and profiling, including exact AQE plan-version binding.
  • Skip synthesized recommendations when no reliable scan baseline exists while preserving configuration precedence and profiling GPU-OOM behavior after a valid baseline.

Testing

  • Scoped ScalaTest AutoTuner and cluster recommendation suites: 200 tests, 0 failures, 0 errors.

Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
@github-actions github-actions Bot added the core_tools Scope the core module (scala) label Aug 9, 2026
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
@parthosa parthosa self-assigned this Aug 9, 2026
@parthosa
parthosa marked this pull request as ready for review August 9, 2026 04:30
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
@sayedbilalbari

Copy link
Copy Markdown
Collaborator

@parthosa for these new AutoTuner enhancements - can we have some sort of numbers around the improvements with these recommendations.
There should be a benchmark suite that shows the performance gains with each new AutoTuner change. Just to make sure this does not lead to regression in other cases

…partition-bytes

Signed-off-by: Partho Sarthi <psarthi@nvidia.com>

# Conflicts:
#	core/src/test/scala/com/nvidia/spark/rapids/tool/tuning/BaseAutoTunerSuite.scala
#	core/src/test/scala/com/nvidia/spark/rapids/tool/tuning/ProfilingAutoTunerSuiteV2.scala
…partition-bytes

Signed-off-by: Partho Sarthi <psarthi@nvidia.com>

# Conflicts:
#	core/src/test/scala/com/nvidia/spark/rapids/tool/tuning/BaseAutoTunerSuite.scala
@parthosa
parthosa requested a review from SYangster August 28, 2026 04:48
@parthosa

Copy link
Copy Markdown
Collaborator Author

cc: @zpuller Could you please help review this?

@parthosa
parthosa merged commit cdfa048 into NVIDIA:dev Aug 31, 2026
17 checks passed
@parthosa
parthosa deleted the fix/cache-derived-max-partition-bytes branch August 31, 2026 22:59
parthosa added a commit to parthosa/spark-rapids-tools that referenced this pull request Aug 31, 2026
…le-autotuning

Brings in the cache-derived maxPartitionBytes work (NVIDIA#2124).

Two conflicts with this branch, both in the AutoTuner test scaffolding:

getMockInfoProvider's constructor call gained maxFileScanInputOverride on
dev and shuffleStageInputAnalysis here. Both are kept, ordered to match
the AppInfoProviderMockTest signature the merge already produced.

FileScanInputMetricsSuite's TestProfilingProvider is built with a null
ApplicationInfo, so the downward pass added on this branch dereferenced
null when it read the shuffle-stage input analysis through it. The stub
now overrides that accessor to report no analysis, matching how it
already stubs getClassPathEntries for the same reason. Only the test
scaffold is affected: the field is genuinely present in production.

Signed-off-by: Partho Sarthi <psarthi@nvidia.com>

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autotuner core_tools Scope the core module (scala)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Prevent cache-derived spark.sql.files.maxPartitionBytes recommendations

5 participants