Bp

blueprint

Ads ranking model development can be represented by an execution graph. Blueprint is a solution to describe and execute such an execution graph.

goal

IR

Execution graph is represented by a data structure which we call “Intermediate Representation” or IR. IR is in JSON format.

Module

When implementing the function execute in GMBModule, we write normal Python code, which describes what execute does.

class GMBModule(BaseModule):
    @gmb_executor_method()
    def execute(params=...):
        process(params)
  • When execution_mode = IR_GENERATION: calling execute(params=...) generates an IR which encodes the fact that the function execute will be called with params remotely later.
  • When execution_mode = IR_EXECUTION: calling execute(params=...) executes process(params)

edge between module

module_a = GMBModule()
module_b = GMBModule2()
module_a.execute()
module_b.set_params(params=module_a.get_result())
module_b.execute()
result = module_b.get_result()

core

BPS

AIR