aws-samples / amazon-sagemaker-from-idea-to-production

Other
214 stars 57 forks source link

sm not defined when creating Projects from console #4

Open athewsey opened 1 year ago

athewsey commented 1 year ago

Hi team,

I like the route to create SM Projects from the console, since it shows users the UI for self-service. However, seems like the notebooks (both training and deployment) don't properly define required variables outside the 'Option 1' block:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-7-567737fbf281> in <module>
      1 # project_name = "<ENTER THE NAME OF THE CREATED PROJECT>"
----> 2 r = sm.describe_project(ProjectName=project_name)
      3 project_id = r['ProjectId']
      4 project_arn = r['ProjectArn']
      5 project_folder = f"{project_name}-{project_id}/sagemaker-{project_name}-{project_id}-modelbuild"

NameError: name 'sm' is not defined