Writing Plugins

You can easily extend MSMBuilder by subclassing BaseEstimator or any of its children. You can even build your plugin to work with the msmb command-line interface.

  1. Subclass cmdline.Command or any of its children. For example, if you want to expose a new Featurizer from the command line.
from msmbuilder.commands.featurizer import FeaturizerCommand
class MyNiftyFeaturizerCommand(FeaturizerCommand):
    klass = MyNiftyFeaturizer
    _concrete = True
  1. Provide your command as an “entry point” with setuptools. Use "msmbuilder.commands" as the entry point. For example, in your setup.py.
setup(
    ...
    entry_points={'msmbuilder.commands':
                       'niftyfeat = niftyfeat:MyNiftyFeaturizerCommand'
)

See the setuptools documentation for more information.