Chalk home page
Docs
API
CLI
  1. Resolvers
  2. Overview

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 @online and @offline. 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.full_name and User.bank_account.title. It resolves the feature value User.account_name_match_score. The logic for resolving this function is given in the body of the function definition.


Resolvers support many workflows and common orchestration patterns:

  • Environments - Swap out the functionality of a resolver in development, staging, or production.
  • Tags - Provide custom functionality within an environment based on tags.
  • Scheduled runs - Schedule periodic runs of resolvers.
  • Reverse ETL - Move features from your data warehouses to production.