Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greenbids RTD Module #5613

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions prebid-server/pbs-modules/greenbids-real-time-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
layout: page_v2
page_type: pbs-module
title: Prebid Server Greenbids Real Time Data Module
display_name : Greenbids Real Time Data Module
sidebarType : 5
---

# Greenbids Real Time Data Module

## Overview

Greenbids Real Time Data module filters bidders
SSP listed in the `imp[].ext.prebid.bidder`
of the bid request. To perform the filtering the module uses the ML pipeline that outputs the probability
of bid per SSP for each imp for the given BidRequest.
Then this probability of bid is compared with the threshold to ensure target True Positive Rate (TPR)
defined for each partner publisher.

## Configuration

### Execution Plan

This module supports running at:

- processed-auction-request: this is where PBS bid request enrichments
are done before customizing it to a particular bidder in the auction.


Check failure on line 29 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-server/pbs-modules/greenbids-real-time-data.md:29 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md
### Account-Level Config

Here's an example of the account config used in PBS-Java:

```yaml
hooks:
greenbids-real-time-data:
enabled: true
host-execution-plan: >
{
"endpoints": {
"/openrtb2/auction": {
"stages": {
"processed-auction-request": {
"groups": [
{
"timeout": 100,
"hook-sequence": [
{
"module-code": "greenbids-real-time-data",
"hook-impl-code": "greenbids-real-time-data-processed-auction-request-hook"
}
]
}
]
}
}
}
}
}
```

### List of module configuration options


Check failure on line 64 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-server/pbs-modules/greenbids-real-time-data.md:64 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md
### Publisher settings

We have observed 2 options how to handle the settings by the activated partner publishers
to avoid adding them to the code base
- add the list of authorized partners with their configs (target TPR, Exploration Rate, pbuid)

Check failure on line 69 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Lists should be surrounded by blank lines

prebid-server/pbs-modules/greenbids-real-time-data.md:69 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- add the list of authorized p..."] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md032.md
in the `prebid-config-with-modules.yaml` common config of prebid and update it buy sending manually to PBS team
- let publishers add their configs direclty into `bid-request.json` where they indicate the activation of our module
in bid request extenstion `bid-request.ext.prebid.analytics.greenbids` and
`bid-request.ext.prebid.analytics.greenbids-rtd`.

At the given moment the 2nd option is implemented in the RTD module.

```json
"ext": {
"prebid": {
"targeting": {
"includewinners": true,
"includebidderkeys": true
},
"analytics": {
"greenbids": {
"pbuid": "PBUID_FROM_GREENBIDS",
"greenbidsSampling": 1
},
"greenbids-rtd": {
"pbuid": "PBUID_FROM_GREENBIDS",

Check failure on line 90 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Hard tabs

prebid-server/pbs-modules/greenbids-real-time-data.md:90:1 MD010/no-hard-tabs Hard tabs [Column: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md010.md
"targetTpr": 0.95,

Check failure on line 91 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Hard tabs

prebid-server/pbs-modules/greenbids-real-time-data.md:91:1 MD010/no-hard-tabs Hard tabs [Column: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md010.md
"explorationRate": 0.001

Check failure on line 92 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Hard tabs

prebid-server/pbs-modules/greenbids-real-time-data.md:92:1 MD010/no-hard-tabs Hard tabs [Column: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md010.md
}
}
}
}
```


Check failure on line 99 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-server/pbs-modules/greenbids-real-time-data.md:99 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md

Check failure on line 100 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-server/pbs-modules/greenbids-real-time-data.md:100 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 3] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md
## Analytics Tags

The RTD module also communicates the filtering results with the `GreenbidsAnalyticsReporter` via AnalyticsTags.
Here we populate AnalyticsResult of AnalyticsTag for each Imp the with

- `fingerprint`: greenbidsId,
- `isKeptInAuction` map of booleans for each bidder wether we keep them in auction or not for the given imp,
- `isExploration`flag that is necessary to isolate the training log

Then the AnalyticsTag is then parsed by the AnalyticsReporter from `ExtBidResponsePrebid`
and its content added to the analytics payload sent to Greenbids server.

The Exploration part of traffic is split randomly with the ratio defined for each partner publisher
per bid requests and is not filtered by the RTD module.

Check failure on line 114 in prebid-server/pbs-modules/greenbids-real-time-data.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Files should end with a single newline character

prebid-server/pbs-modules/greenbids-real-time-data.md:114:55 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md047.md
Loading