AWS SageMaker - Python Compatibility?


#1

I am trying to run speech-recognition example on AWS SageMaker. (I am not an expert with Python.) I’m getting an error with the LabelUtil class and the SIngleton (decorator?):

new

TypeError Traceback (most recent call last)
in ()
—> 12 from label_util import LabelUtil

~/SageMaker/stt/speech_recognition/label_util.py in ()
24
25
—> 26 @Singleton
27 class LabelUtil:
28 _log = None

~/SageMaker/stt/speech_recognition/singleton.py in new(class_, *args, **kwargs)
32 def new(class_, *args, **kwargs):
33 print “new
—> 34 class_.instances[class_] = super(Singleton, class_).new(class_, *args, **kwargs)
35 return class_.instances[class_]
36

TypeError: object() takes no parameters

As a Python neophyte, my first reaction is, the software is fine but I’m missing something in my environment related to compatibility. Can anyone give me a clue or has anyone run these examples with SageMaker?


#2

duh - looks like running a SageMaker notebook with a Python 2.7 kernal fixed the problems. I was using a 3.6 kernal