Stream logs unified improvement - #6127
Merged
zhaoqizqwang merged 2 commits intoJul 30, 2026
Merged
Conversation
amazeAmazing
force-pushed
the
stream-logs-unified-improvement
branch
from
July 29, 2026 22:06
54c2b39 to
28af702
Compare
amazeAmazing
marked this pull request as ready for review
July 29, 2026 22:07
Fixes three stream_logs() bugs identified in bug bash testing: 1. MTRL trainer stream_logs() now uses the correct log group (/aws/sagemaker/Job/AgentRFT) and polls status via Job API instead of TrainingJob API — previously hung forever showing nothing. 2. Adds stream_logs() to BaseEvaluator and EvaluationPipelineExecution with support for pipeline, MTRL eval, and HyperPod backends. 3. Patches _stream_logs_smhp() to provide user feedback instead of silently swallowing ResourceNotFoundException and empty events. Introduces LogStreamer utility (poll-once pattern) and stream_log_loop() shared helper to eliminate code duplication across all callers.
… jobs Integration tests for evaluator.stream_logs() against completed pipeline executions in us-west-2/729646638167. Covers BenchMarkEvaluator, CustomScorerEvaluator, and LLMAsJudgeEvaluator. No new jobs launched.
amazeAmazing
force-pushed
the
stream-logs-unified-improvement
branch
from
July 29, 2026 22:08
28af702 to
6e5a200
Compare
zhaoqizqwang
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
fix(stream_logs): unify log streaming for MTRL, evaluators, and HyperPod
Summary
stream_logs()now uses correct log group (/aws/sagemaker/Job/AgentRFT) and polls via Job API — previously hung forever_stream_logs_smtj()refactored to useLogStreamer+stream_log_loop— same timeout/feedback behavior as MTRL and evaluatorsstream_logs()onBaseEvaluator(pipeline and HyperPod dispatch)_stream_logs_smhp()provides user feedback instead of silent failureWhat changed
common_utils/log_streamer.pyLogStreamer(poll-once CW utility) +stream_log_loop()shared helper. Warns after ~30s of no events, exits after ~5min.agent_rft_job.pystream_logs()multi_turn_rl_trainer.pystream_logs()with correct log groupbase_trainer.py_stream_logs_smtj()to useLogStreamer+stream_log_loop. Patch_stream_logs_smhp()withClientErrorhandling + feedback.evaluate/base_evaluator.py_latest_execution(set by_start_executionand_submit_hyperpod_eval_job) +stream_logs()with HP/pipeline dispatch# evaluator.stream_logs()/# job.stream_logs()examplesTesting
Unit tests (35):
test_log_streamer.py: LogStreamer stream/filter mode, dedup, error handling,stream_log_loopearly-exit/terminal/feedback/retry/timeouttest_stream_logs.py: AgentRFTJob, MultiTurnRLTrainer, BaseEvaluator, ARN resolutionIntegration tests (8, no new jobs launched):
test_stream_logs_trainer.py(us-west-2 / 729646638167): MTRL viaAgentRFTJob.get(), serverful SMTJ, input validationtest_stream_logs_evaluator.py(us-west-2 / 729646638167): BenchMarkEvaluator, CustomScorerEvaluator, LLMAsJudgeEvaluator — each with real completed pipeline execution ARNsOpen questions
AgentRFTJob.stream_logs()exists for the attach-to-existing-job use case (AgentRFTJob.get("name").stream_logs()). SMTJ trainers (SFT/DPO/RLVR) have no equivalent attach-and-stream pattern — users must construct a trainer and stuff_latest_training_job. Should we add a similar wrapper or a standalone helper for SMTJ jobs?How to verify
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.