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.
- 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
- Provide your command as an “entry point” with
setuptools
. Use"msmbuilder.commands"
as the entry point. For example, in yoursetup.py
.
setup(
...
entry_points={'msmbuilder.commands':
'niftyfeat = niftyfeat:MyNiftyFeaturizerCommand'
)
See the setuptools documentation for more information.