Create resolvers to compute feature values.
Resolvers are Python functions that compute your feature values. Resolvers take as input features that they need to know to run, and resolve the values of one or more features. In both cases, you use Python type annotations to define these dependencies and outputs.
Resolvers run online or offline
and are declared with the decorators
Let’s take a look at a resolver that computes whether
a user is titled on a bank account:
@online def name_match( name: User.full_name, account_name: User.bank_account.title ) -> User.account_name_match_score: if name.lower() == account_name.lower(): return 1. return 0.
This resolver has dependencies on
User.bank_account.title. It resolves the feature
The logic for resolving this function is given in the body
of the function definition.
Resolvers support many workflows and common orchestration patterns: