sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

fix: remove sagemaker-local network before compose

Open bzheng06 opened this issue 1 year ago • 7 comments

Issue #, if available: Issue #4659

Description of changes:

Simple bug fix to the linked issue, run "docker network rm sagemaker-local" before doing the docker compose during setup for a processing job in local mode, stream the output and continue if the network rm fails. The bug I was seeing was from the sagemaker-local network already existing before the job was ran, so this should tear it down before docker-compose and fix it.

Testing done:

No new tests added, ran with existing unit tests locally and results remain the same.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • [x] I have read the CONTRIBUTING doc
  • [x] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • [x] I used the commit message format described in CONTRIBUTING
  • [x] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • [x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • [x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [x] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • [x] I have checked that my tests are not configured for a specific region or account (if appropriate)
  • [x] I have used unique_name_from_base to create resource names in integ tests (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

bzheng06 avatar May 22 '24 15:05 bzheng06

This also fixes the scenario when a user ctrl+c's or kill -9's the python process running a local mode job so it never cleans up the compose stack. That happens more frequently than one would think.

jmahlik avatar May 23 '24 13:05 jmahlik

@mufaddal-rohawala have you had a chance to take a look at this yet?

bzheng06 avatar Jun 14 '24 14:06 bzheng06

@bzheng06 can you force push a temp commit to restart the workflow?

sage-maker avatar Aug 11 '24 17:08 sage-maker

@sage-maker pushed to restart

bzheng06 avatar Aug 15 '24 14:08 bzheng06

@sage-maker temp commit has been pushed, PR still needs approval

bzheng06 avatar Aug 26 '24 17:08 bzheng06

Can you check integ tests?

sage-maker avatar Aug 26 '24 21:08 sage-maker

Can you check integ tests?

@sage-maker Synced with the most recent changes to master and pushed

bzheng06 avatar Aug 27 '24 15:08 bzheng06