Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix loading user custom script #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SuperBo
Copy link

@SuperBo SuperBo commented Aug 30, 2022

Issue #86:
I think the issue is very well mentioned here
#86
Description of changes:

Change PYTHONPATH environment after loading your python program won't affect the import paths that python will use to import libraries and modules. In order to change the import paths, we need to change "sys.path" variable.

Testing done:

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

  • I have read the CONTRIBUTING doc
  • I used the commit message format described in CONTRIBUTING
  • I have used the regional endpoint when creating S3 and/or STS clients (if appropriate)
  • I have updated any necessary documentation, including READMEs

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

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

@SuperBo SuperBo force-pushed the fix-loading-user-custom-script branch from b53de53 to b26d2f2 Compare August 30, 2022 14:57
@Otje89
Copy link

Otje89 commented May 1, 2023

What is the status of this merge request? I'm experiencing the same issue and found that it was indeed caused by the same line of code. It would be great to have this updated.

@Alex-Wenner-FHR
Copy link

I am still experiencing this issue in 2024. Has there been any fix? This looks like a simple solution given this is indeed the issue.

@ViktorMalesevic
Copy link

Same issue here. When adding sagemaker-inference to my own container, this line:

forces all modules that an entrypoint will use to be copied to "/opt/ml/model/code/" and the entrypoint to be placed at the root of "/opt/ml/model/code/". This is not documented in https://github.com/aws/sagemaker-inference-toolkit/tree/master?tab=readme-ov-file#implementation-steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants