Skip to content
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

Cell fails in 5_dashboard #5

Open
juliensimon opened this issue Oct 26, 2020 · 1 comment
Open

Cell fails in 5_dashboard #5

juliensimon opened this issue Oct 26, 2020 · 1 comment

Comments

@juliensimon
Copy link

Calling get_notebook_name() fails with KeyError: 'SolutionPrefix'

port = 8501
url = get_dashboard_url(port)
!echo Dashboard URL: {url}
!(cd ../containers/dashboard/src && streamlit run app.py --server.port {port})

KeyError Traceback (most recent call last)
in
1 port = 8501
----> 2 url = get_dashboard_url(port)
3 get_ipython().system('echo Dashboard URL: {url}')
4 get_ipython().system('(cd ../containers/dashboard/src && streamlit run app.py --server.port {port})')

in get_dashboard_url(port)
8
9 def get_dashboard_url(port):
---> 10 notebook_name = get_notebook_name()
11 region_name = sagemaker.Session().boto_region_name
12 return f"https://{notebook_name}.notebook.{region_name}.sagemaker.aws/proxy/{port}/"

in get_notebook_name()
2 with open('/opt/ml/metadata/resource-metadata.json') as openfile:
3 data = json.load(openfile)
----> 4 notebook_name = data['SolutionPrefix']
5 return notebook_name
6 #return 'sm-soln-explaining-credit-decisions-notebook'

KeyError: 'SolutionPrefix'

@thomelane
Copy link
Contributor

Seems there was an overzealous find and replace. It should be ResourceName. I'll change this back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants