Inference error in docker "Cannot find attribute shape in the graph"


Encountered below error when server MXNet model in the play web framework. It happens occasionally under API load testing, any idea how can I fix it?

org.apache.mxnet.MXNetError: [21:32:44] /home/ubuntu/releaseScala1.5/cpu/3rdparty/tvm/nnvm/include/nnvm/graph.h:263: Check failed: it != attrs.end(): Cannot find attribute shape in the graph
Stack trace:
[bt] (0) /tmp/mxnet118010169239629563/ [0x7fbf186ef66b]
[bt] (1) /tmp/mxnet118010169239629563/ [0x7fbf1a8d26e0]
[bt] (2) /tmp/mxnet118010169239629563/ [0x7fbf1a8d7e7e]
[bt] (3) /tmp/mxnet118010169239629563/ [0x7fbf1a82ff98]
[bt] (4) [0x7fbf610186c7]

    at org.apache.mxnet.Base$.checkCall(Base.scala:111)
    at org.apache.mxnet.Executor.forward(Executor.scala:175)
    at org.apache.mxnet.FeedForward.predict(FeedForward.scala:249)
    at controllers.ModelController$$anonfun$recModel$1.apply(ModelController.scala:40)
    at controllers.ModelController$$anonfun$recModel$1.apply(ModelController.scala:27)
    at play.api.mvc.ActionBuilder$$anonfun$apply$11.apply(Action.scala:363)
    at play.api.mvc.ActionBuilder$$anonfun$apply$11.apply(Action.scala:363)
    at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:52)
    at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:482)




Can you share more of the code / model so that I might be able to help you?

Failure under load might point to your multi-threading model having an issue with concurrent requests.

Thx the issue has been solved. Basically I was using Mac os mxnet dependency to build the jar and trying to run it inside an Alpine docker container. After I switch dependency to Linux mxnet everything is working properly.

1 Like