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
There is a non-trivial requirement if you would like to use the functionality of loading magda's pipeline from the config file. Every madga Module.Runtime has to be registered with ModuleFactory.register function. A convenient alternative to do that is using @register decorator. However, this @register decorator has to be invoked somehow before loading the pipeline. A very easy workaround for this is to import all modules that you have implemented with one line of import:
from modules import *
This assumes that you imported all modules in modules/__init__.py file.
I propose to add two small changes. First one is to mention this suggestion in the documentation here or in this section. The second thing that could be very useful is to change the error message by adding a question: 'Didn't you forget to import this module with @register decorator?'
The text was updated successfully, but these errors were encountered:
There is a non-trivial requirement if you would like to use the functionality of loading magda's pipeline from the config file. Every
madga Module.Runtime
has to be registered withModuleFactory.register
function. A convenient alternative to do that is using@register
decorator. However, this@register
decorator has to be invoked somehow before loading the pipeline. A very easy workaround for this is to import all modules that you have implemented with one line of import:This assumes that you imported all modules in
modules/__init__.py
file.I propose to add two small changes. First one is to mention this suggestion in the documentation here or in this section. The second thing that could be very useful is to change the error message by adding a question: 'Didn't you forget to import this module with
@register
decorator?'The text was updated successfully, but these errors were encountered: