Model customization
Credmark uses a simple base class called ‘Model’ class to set up a model.
All Models should import this class import credmark.cmf.model
and can override the run() method.
The @Model.describe()
decorator provides a simple interface to define the model properties such as slug, version, display_name, description, developer, input, output etc so that it can be used easily by consumers and other models.
If description is not specified, the __doc__
string of the model's class is used for the model description.
Let's make this model our own by customization.
The in-file instructions are the first things to do. Let's complete them and then remove the instruction comments. The resulting file is more concise.
Use credmark-dev describe
with the mode slug to check whether we can load the model correctly. yay! There has been no error so far.
Last updated