LBHB / NEMS0

THIS VERSION OF NEMS IS NO LONGER SUPPORTED. PLEASE USE THE NEW NEMS REPOSITORY OR INSTALL NEMS_DB TO GET NEMS0 SUPPORT.
GNU General Public License v3.0
8 stars 4 forks source link

Cnn #210

Closed svdavid closed 4 years ago

svdavid commented 4 years ago

Dumb branch name, actually dealing with #171 to work on keyword simplification.

new configuration setting LIB_PLUGINS. When you import nems, init.py creates registries (xforms_lib and keyword_lib) it will then import modules listed in LIB_PLUGINS. any function with the decorator xform or xmodule will be imported into the appropriate registry. xforms then uses these existing registries rather than creating new ones when you fit a model. I don't see why it's a problem--unless you want to have two sets of registries around(?)

to test, you can get the new nems_db master and add LIB_PLUGINS = ['nems_lbhb.columbia_helpers'] to nems.configs.settings

svdavid commented 4 years ago

@awctomlinson Thanks. Yeah, this does look very similar. I think the keywords can still be embedded in an object (like you did). Only difference as it is now is that the decorators assume that the function name is the keyword name. ... I guess the question is if it's helpful to have a generic "keyword" method and make the keyword a parameter or if my system will work. Well, we can always make it support either, just by adding an option to nems.registry.xform to pass the keyword name.