---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-43-a34f02098586> in <module>
1 # create an ML function from the notebook, attache it to iguazio data fabric (v3io)
----> 2 trainer = code_to_function(name='my-trainer', runtime='job', with_doc=True)
~/.pythonlibs/lib/python3.6/site-packages/mlrun/run.py in code_to_function(name, project, tag, filename, handler, runtime, kind, image, embed_code, with_doc)
376
377 if with_doc:
--> 378 handlers = find_handlers(code)
379 r.spec.entry_points = {h[name]: h for h in handlers}
380 return r
~/.pythonlibs/lib/python3.6/site-packages/mlrun/funcdoc.py in find_handlers(code, handlers)
209 visitor = ASTVisitor()
210 visitor.visit(mod)
--> 211 funcs = [ast_func_info(fn) for fn in visitor.funcs]
212 if handlers:
213 return [f for f in funcs if f['name'] in handlers]
~/.pythonlibs/lib/python3.6/site-packages/mlrun/funcdoc.py in <listcomp>(.0)
209 visitor = ASTVisitor()
210 visitor.visit(mod)
--> 211 funcs = [ast_func_info(fn) for fn in visitor.funcs]
212 if handlers:
213 return [f for f in funcs if f['name'] in handlers]
~/.pythonlibs/lib/python3.6/site-packages/mlrun/funcdoc.py in ast_func_info(func)
160 def ast_func_info(func: ast.FunctionDef):
161 doc = ast.get_docstring(func) or ''
--> 162 rtype = func.returns.id if func.returns else ''
163 params = [ast_param_dict(p) for p in func.args.args]
164 defaults = func.args.defaults
AttributeError: 'NameConstant' object has no attribute 'id'