You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a LocalSession or LocalPipelineSession is configured to use local code, as follows
session.config= {'local': {'local_code': True}}
the code passed to a pipeline ProcessingStep or directly to the run method of a processor (ScriptProcessor, FrameworkProcessor, ...) should not be uploaded to S3.
However, ScriptProcessor does not honor this. Its _include_code_in_inputs method (which is called unconditionally by the _normalize_args of the base class Processor, which in turn is called both when running directly and through a pipeline) unconditionally tries to upload the code to S3.
Compare this to the Model class, used for example in the TrainingStep. Its _upload_code method checks the session configuration and does not upload to S3 when local code is enabled.
To reproduce
In the absence of any AWS credentials (which should not be needed when running completely locally), the following code will fail to upload the processing.py script to S3 (botocore.exceptions.NoCredentialsError). Note that, in addition to the following code, a processing.py file must exist in the working directory (but its contents don't matter).
@clausagerskov in general, local development is partially possible. Meaning, some things do work, others (such as the one described in this bug) don't. Your milage may vary.
Regarding this specific bug, as far as I can tell no AWS developer even looked at it. Nor did anyone look at any of the other bugs that I opened. I don't have time to take care of all of this, so I decided to just avoid Sagemaker for the time being.
Although local mode in documentation is said to be supported, it requires user to upload input code into S3 as stated in this issue. If there is a forced upload as a side effect, what is the reason why this is a must if local mode meant to use local resources to run said pipeline ?
Describe the bug
When a
LocalSession
orLocalPipelineSession
is configured to use local code, as followsthe code passed to a pipeline
ProcessingStep
or directly to therun
method of a processor (ScriptProcessor
,FrameworkProcessor
, ...) should not be uploaded to S3.However,
ScriptProcessor
does not honor this. Its_include_code_in_inputs
method (which is called unconditionally by the_normalize_args
of the base classProcessor
, which in turn is called both when running directly and through a pipeline) unconditionally tries to upload the code to S3.sagemaker-python-sdk/src/sagemaker/processing.py
Line 625 in 554952e
Compare this to the
Model
class, used for example in theTrainingStep
. Its_upload_code
method checks the session configuration and does not upload to S3 when local code is enabled.sagemaker-python-sdk/src/sagemaker/model.py
Line 532 in 554952e
To reproduce
In the absence of any AWS credentials (which should not be needed when running completely locally), the following code will fail to upload the
processing.py
script to S3 (botocore.exceptions.NoCredentialsError
). Note that, in addition to the following code, aprocessing.py
file must exist in the working directory (but its contents don't matter).Code
System information
A description of your system. Please provide:
The text was updated successfully, but these errors were encountered: