fix/issue 5897 crlf sm train - #6088
Open
wasim-builds wants to merge 3 commits into
Open
wasim-builds wants to merge 3 commits into
wasim-builds wants to merge 3 commits into
Conversation
wasim-builds
had a problem deploying
to
manual-approval
July 23, 2026 08:13 — with
GitHub Actions
Error
wasim-builds
had a problem deploying
to
manual-approval
July 23, 2026 08:13 — with
GitHub Actions
Error
wasim-builds
had a problem deploying
to
manual-approval
July 23, 2026 08:13 — with
GitHub Actions
Error
wasim-builds
had a problem deploying
to
manual-approval
July 24, 2026 05:51 — with
GitHub Actions
Error
wasim-builds
had a problem deploying
to
manual-approval
July 24, 2026 05:51 — with
GitHub Actions
Error
wasim-builds
had a problem deploying
to
manual-approval
July 24, 2026 05:51 — with
GitHub Actions
Error
wasim-builds
force-pushed
the
fix/issue-5897-crlf-sm-train
branch
from
July 25, 2026 09:01
15e650b to
fa7b7aa
Compare
wasim-builds
had a problem deploying
to
manual-approval
July 25, 2026 09:01 — with
GitHub Actions
Failure
wasim-builds
had a problem deploying
to
manual-approval
July 25, 2026 09:01 — with
GitHub Actions
Failure
wasim-builds
had a problem deploying
to
manual-approval
July 25, 2026 09:01 — with
GitHub Actions
Failure
rsareddy0329
added a commit
that referenced
this pull request
Sep 30, 2026
FrameworkProcessor._package_code read and deleted its temporary tar.gz while the NamedTemporaryFile handle was still open. On Windows that raises PermissionError (WinError 32) because the file is still held by the open handle. Close the handle first, read the archive in a with-open context, and unlink it in a finally block so the temp file is removed on every path. The LF line-ending fixes for sm_train.sh and the repack launcher that originally shared this branch are covered by open PRs #6255 / #6088 (sm_train.sh) and #6313 (repack launcher), so they are not repeated here. Fixes #5873 --- X-AI-Prompt: Fix S-effort PySDK V3 bugs, windows theme X-AI-Tool: Kiro Co-authored-by: rsareddy0329 <rsareddy0329@gmail.com>
Author
|
Hi everyone, Quick follow-up on this PR concerning fix/issue 5897 crlf sm train in aws/sagemaker-python-sdk. Working on Amazon SageMaker Python SDK machine learning and model deployment pipelines has been a great experience, and I am very keen to continue contributing to aws/sagemaker-python-sdk. I am also open to collaborating on a contract/freelance basis, discussing full-time opportunities, or joining the organization/team. You can view my background and other open-source contributions at https://github.com/wasim-builds. |
Collaborator
|
Apologies for opening and re-opening, will add unit tests and look to get this merged! |
Adds the unit test from aws#5907 plus an OS-independent regression guard. The byte-level check from aws#5907 (no CRLF in the written sm_train.sh) only fails on Windows, since POSIX text-mode open() never translates \n. CI runs on Linux, so that test passes with or without the fix. The second test inspects the open() call for sm_train.sh and asserts newline="\n", mirroring the approach merged in aws#6313 for the mlops repack launcher, so the guard holds on any host OS.
mohamedzeidan2021
requested a deployment
to
manual-approval
October 5, 2026 20:45 — with
GitHub Actions
Waiting
mohamedzeidan2021
requested a deployment
to
manual-approval
October 5, 2026 20:45 — with
GitHub Actions
Waiting
mohamedzeidan2021
requested a deployment
to
manual-approval
October 5, 2026 21:27 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
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.
Fixes #5897
Problem
ModelTrainerwrites files with platform-default line endings, causing CRLF/LF inconsistencies on Windows.Fix
Explicitly normalize line endings to LF when writing training artifacts.
Scope
Single-line change in
sagemaker-train/src/sagemaker/train/model_trainer.py.Verification
Training artifacts now have consistent LF line endings regardless of OS.