(local) "File or directory not found", when input_data points to a single S3 file #5033
Labels
component: pysdk-team
Related to SageMaker Python SDK Core Issues
component: training
Relates to the SageMaker Training Platform
Describe the bug
SageMaker Local lets you train models using data either on your local machine or S3. When using
ModelTrainer
, these artifacts are stored in a local directory underlocal_container_root
, where for each channel, aTemporaryDirectory
is created and files are copied there.However, I've noticed that if your input data is a single S3 file, the temporary directory is not created, leading to a
File or directory not found
error.I found that adding a
os.makedirs(local_dir, exists_ok=True)
after this line fixes the problem:sagemaker-python-sdk/src/sagemaker/modules/local_core/local_container.py
Line 551 in 96e49ba
but there's probably a cleaner way.
To reproduce
Expected behavior
The files are downloaded locally
Screenshots or logs
See stack trace below:
Stack trace (click to expand)
System information
A description of your system. Please provide:
2.239.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: