1
fig, axes = plt.subplots(2,figsize=(15,10)) sns.lineplot(agg_cases_death.index, agg_cases_death.cases, ax=axes[0]).set_title('Cases') sns.lineplot(agg_cases_death.index, agg_cases_death.deaths, ax=axes[1]).set_title('Deaths') plt.show() 

The above used to work perfectly on jupyter notebook on my desktop but while I ran the same code in AWS Sagemaker Jupyter notebook it produces error. It says the module 'seaborn' has no attribute lineplot.

Is there something we need to set up while using aws sagemaker jupyter?

1
  • If the notebook runs on your local machine, you might start with checking which version of the package you have installed and ensuring the same version is installed on the remote host. $ pip show seaborn will print some package details, including the version you have installed. Commented May 29, 2020 at 2:55

1 Answer 1

2

AWS Sagemaker is, famously, utterly shit at this.

Try sns.__version__ and you will find you are running an old seaborn version.

You may be able to resolve this with:

del sns

!conda update seaborn --yes

import seaborn as sns sns.__version__ 

in separate cells.

Seaborn is part of the default conda setup on a sagemaker instance, so you can't use a pip install to fix the version issue.

Sign up to request clarification or add additional context in comments.

1 Comment

I got here looking for why graphs didn't show up in Sagemaker. For others encountering the same issue, I found the fix here: stackoverflow.com/questions/47507830/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.