UnboundLocalError when invalid SourceCode is provided #5041
Labels
component: pysdk-team
Related to SageMaker Python SDK Core Issues
component: training
Relates to the SageMaker Training Platform
type: bug
Describe the bug
A clear and concise description of what the bug is.
This error happens in the
_prepare_train_script()
method if code execution reaches this line without setting the execute_driver variable.From some testing looks like this happens when an invalid
SourceCode
is provided to model trainer it results in an error likeFor example:
2 issues:
else
to raise error with more informative message instead of falling through and failing laterSourceCode
class should fail sooner if user incorrectly tries to setentry_point
instead ofentry_script
To reproduce
A clear, step-by-step set of instructions to reproduce the bug.
The provided code need to be complete and runnable, if additional data is needed, please include them in the issue.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.
System information
A description of your system. Please provide:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: