developmentseed / developmentseed/label-maker

Sagemaker 'NoneType object' issue with data in 'walkthrough-classification-mxnet-sagemaker' example

Open
#90 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
472
Forks
106
PR merge metrics
No merged PRs in 30d

Description

I've been following the walkthough found [here](https://github.com/developmentseed/label-maker/blob/master/examples/walkthrough-classification-mxnet-sagemaker.md) (albeit with a smaller bounding box), and have initiated a Sagemaker Notebook instance. The data.npz file is sitting in the sagemaker folder, and I'm having no problem reading it when running the relevant sections of mx_lenet_sagemaker.py in a new notebook on the instance, however when I run the second cell of [SageMaker_mx-lenet](https://github.com/developmentseed/label-maker/blob/master/examples/nets/SageMaker_mx-lenet.ipynb) I hit the following error:

```
ValueError: Error training sagemaker-mxnet-2018-07-08-18-12-13-217: Failed Reason: AlgorithmError: uncaught exception during training: 'NoneType' object has no attribute 'read'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/container_support/training.py", line 36, in start
fw.train()
File "/usr/local/lib/python2.7/dist-packages/mxnet_container/train.py", line 191, in train
model = user_module.train(**kwargs_to_pass)
File "/opt/ml/code/mx_lenet_sagemaker.py", line 92, in train
train_iter, val_iter = prep_data(data_path)
File "/opt/ml/code/mx_lenet_sagemaker.py", line 14, in prep_data
data = np.load(find_file(data_path, 'data.npz'))
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 402, in load
magic = fid.read(N)
AttributeError: 'NoneType' object has no attribute 'read'
```
After several hours trying different fixes I'm having little to no luck debugging, but was hoping you could check the example to ensure it runs fine when you attempt it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.