You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "firasbouzazi (via GitHub)" <gi...@apache.org> on 2026/10/11 14:56:21 UTC
[PR] [SPARK-59985][4.1][ML][PYTHON] Fix malformed warning in TorchDistributor when the log streaming server fails to start [spark]
firasbouzazi opened a new pull request, #59383:
URL: https://github.com/apache/spark/pull/59383
### What changes were proposed in this pull request?
Backport of #59242 to branch-4.1.
Fix the warning that `TorchDistributor._run_distributed_training` emits when the log streaming server fails to start. The message had a stray comma, so the error text was passed to `logger.warning` as an extra positional argument, and formatting the record raised `TypeError: not all arguments converted during string formatting`. The warning now uses a single format string with the exception as its argument.
The cherry-pick conflicted only in the test file, where master has a neighbouring test that is not on this branch. Adaptations to the test:
- The test does not assert `log_streaming_auth_secret`, which does not exist on this branch.
- The test file now imports `MagicMock`, which it did not import on this branch.
### Why are the changes needed?
Users see a `--- Logging error ---` traceback instead of the one-line warning explaining why worker logs are missing (or nothing, with `logging.raiseExceptions = False`).
### Does this PR introduce _any_ user-facing change?
Yes. When the log streaming server fails to start, users get the intended warning instead of a logging error traceback.
### How was this patch tested?
`test_log_streaming_server_start_failure_warns` (added in #59242) fails with the `TypeError` above without the fix and passes with it on this branch. `TorchDistributorBaselineUnitTests` passes.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org