zhengruifeng opened a new pull request, #57735: URL: https://github.com/apache/spark/pull/57735
### What changes were proposed in this pull request? This patch creates the StringIndexerModel label-to-index lookup maps inside `transform` and passes them to invalid-value filtering. The maps are no longer retained as derived model state. ### Why are the changes needed? The lookup maps are only needed to transform input data. Creating them during transformation avoids retaining them on models that are fit or loaded but never transformed. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `build/sbt 'mllib/testOnly org.apache.spark.ml.feature.StringIndexerSuite'`\n\nAll 28 tests passed. No new test was added because this is an internal lifecycle refactor; the existing suite covers normal indexing and invalid-value handling.\n\n### Was this patch authored or co-authored using generative AI tooling?\n\nGenerated-by: Codex (GPT-5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
