You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use diaparser (https://github.com/Unipisa/diaparser), to make dependency tree parses from sentences. I want this to be in the form of a runner, so that I can use Bentoml's adaptive batching to make full use of the gpu capabilities of the machine, as a single parse run can take up to 30 seconds. The way the diaparser exposes the capability for you to preform a prediction is as follows:
fromdiaparser.parsersimportParserdiaparser_parser_object=Parser.load("en_ewt-electra")
result=diaparser_parser_object.predict([['This is a single sentence.']])
I created a runnable class utilizing this predict function, and using the appropriate decorator for a runnable method:
Which leads me to believe that the object I get from diaparser.parsers.Parser.load is not able to be used as a runner object. Unless I am doing something wrong? Does anyone have any ideas as to how to accomplish this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to use diaparser (https://github.com/Unipisa/diaparser), to make dependency tree parses from sentences. I want this to be in the form of a runner, so that I can use Bentoml's adaptive batching to make full use of the gpu capabilities of the machine, as a single parse run can take up to 30 seconds. The way the diaparser exposes the capability for you to preform a prediction is as follows:
I created a runnable class utilizing this predict function, and using the appropriate decorator for a runnable method:
Calling this method directly works fine, and behaves as a normal .predict call would. However, when I turn this into a runner:
and try to call .run, I get this error:
Which leads me to believe that the object I get from diaparser.parsers.Parser.load is not able to be used as a runner object. Unless I am doing something wrong? Does anyone have any ideas as to how to accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions