aws / aws/amazon-sagemaker-examples

[Bug Report] cp: cannot stat '/root/.keras/keras_mxnet.json': No such file or directory

Open
#3,317 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

**Link to the notebook**
https://github.com/aws-samples/reinvent2018-srv404-lambda-sagemaker/blob/master/training/sms_spam_classifier_mxnet.ipynb

**Describe the bug**
I am writing a lifecycle configuration script, I can run the script well on a notebook terminal:
![image](https://user-images.githubusercontent.com/37609013/162772849-b38e069c-5cf0-4537-ab66-5b84c2884d13.png)
However, when I try to run it on lifecycle, it failed with the line`source "/home/ec2-user/anaconda3/bin/activate" mxnet_p36`,
the log reports:
![image](https://user-images.githubusercontent.com/37609013/162773924-fbfe1ac6-9544-40f9-b9a9-57025811a8c0.png)

**To reproduce**
The lifecycle script is:
```
set -e
NOTEBOOK_FILE="/home/ec2-user/SageMaker/smlambdaworkshop/training/sms_spam_classifier_mxnet.ipynb"
echo "activate mxnet_p36"
source "/home/ec2-user/anaconda3/bin/activate" mxnet_p36
echo "execute jupyter notebook"
jupyter trust "$NOTEBOOK_FILE"
nohup jupyter nbconvert --to notebook --inplace --execute "$NOTEBOOK_FILE" --ExecutePreprocessor.kernel_name=python3 --ExecutePreprocessor.timeout=-1&
echo "finish executing jupyter notebook"
```

**Logs**
![image](https://user-images.githubusercontent.com/37609013/162773983-758aa983-fdf0-485b-be84-1e8def60730a.png)

Contributor guide

Open the contributing guide

Research direction

Start with the lifecycle script in the issue and the linked training/sms_spam_classifier_mxnet.ipynb notebook. Compare the notebook-terminal execution with the lifecycle logs, beginning at the environment activation and subsequent Jupyter commands. Done means the lifecycle configuration executes the notebook without the missing-file failure, with the cause and verification recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook, shell
Domain
cloud, devops, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.