-
Notifications
You must be signed in to change notification settings - Fork 61
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
SKLearnProcessor unable to recognize preprocessing file in sagemaker local mode #30
Comments
What happens if you try to run the example in the same container but in command line? |
I have the same issue, how did you resolve? |
@eitansela I get the same error, Im not working on vscode. I see it is not able to recognise the path - can you please help me. |
@VibhavariBellutagi19 can you run it not as part of VSCode, but with |
@eitansela i was able to run it outside of the dev container successfully just by invoking the local script |
Hello, I am experiencing an issue while using SageMaker to build a machine learning model. in Sagemaker local mode, I am facing an issue that says "python3: can't open file '/opt/ml/processing/code/processing_script.py': [Errno 2] No such file or directory." Even though the file is present in the correct location, the same code works fine in the normal mode. I am running my project in vscode dev conatiner and inside the dev container i am trying out the sagemaker local mode. Please let me know what could possibly be wrong with the following code.
Error
Code
from sagemaker.local import LocalSession
from sagemaker.processing import ProcessingInput, ProcessingOutput
from sagemaker.sklearn.processing import SKLearnProcessor
sagemaker_session = LocalSession()
sagemaker_session.config = {"local": {"local_code": True}}
role = "arn:aws:iam::111111111111:role/service-role/AmazonSageMaker-ExecutionRole-20200101T000001"
processor = SKLearnProcessor(
framework_version="0.20.0", instance_count=1, instance_type="local", role=role
)
print("Starting processing job.")
print(
"Note: if launching for the first time in local mode, container image download"
" might take a few minutes to complete."
)
processor.run(
code="processing_script.py",
inputs=[
ProcessingInput(
source='./input_data/',
destination="/opt/ml/processing/input_data/",
)
],
outputs=[
ProcessingOutput(
output_name="word_count_data", source="/opt/ml/processing/processed_data/"
)
],
arguments=["job-type", "word-count"],
)
preprocessing_job_description = processor.jobs[-1].describe()
output_config = preprocessing_job_description["ProcessingOutputConfig"]
print(output_config)
for output in output_config["Outputs"]:
if output["OutputName"] == "word_count_data":
word_count_data_file = output["S3Output"]["S3Uri"]
print("Output file is located on: {}".format(word_count_data_file))
The text was updated successfully, but these errors were encountered: