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
First of all, many thanks for developing TorchServe!
Is your feature request related to a problem? Please describe.
You need to specify a file to use a custom handler.
This requirements prevents for code reusing. For example, your custom handler can't extend other custom handlers. Also, helper classes or custom transforms must be defined in the same file and can't be reused by other handlers.
Describe the solution
Allow to use handlers implemented in a Pypi package. So, torchserve --handler you allow to pass the import route to the handler. The value would need to be a valid import route that can be dynamically loaded with importlib library.
First of all, many thanks for developing TorchServe!
Is your feature request related to a problem? Please describe.
You need to specify a file to use a custom handler.
This requirements prevents for code reusing. For example, your custom handler can't extend other custom handlers. Also, helper classes or custom transforms must be defined in the same file and can't be reused by other handlers.
Describe the solution
Allow to use handlers implemented in a Pypi package. So,
torchserve --handler
you allow to pass the import route to the handler. The value would need to be a valid import route that can be dynamically loaded withimportlib
library.Example:
torchserve --handler my_package.hander.custom_handler.CustomHandler
Describe alternatives solution
There are two alternative solutions:
--extra-files
to pass extra python files. See this comment. However, user must be careful on adding of necessary files.torchserve --handler
handler file path as usual. This is how I do it currently.The text was updated successfully, but these errors were encountered: