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

Handle bandit parameter coefficients provided as maps (Objects) #57

Merged
merged 1 commit into from
May 31, 2024

Conversation

aarsilv
Copy link
Collaborator

@aarsilv aarsilv commented May 31, 2024

Eppo Internal: 🎟️ Ticket: FF-2269

This change has the SDK ingest bandit parameter coefficients as a map of actions to that action's coefficients rather than as a list of an action key and associated coefficients.

Iterator<Map.Entry<String, JsonNode>> coefficientIterator = coefficientsNode.fields();
coefficientIterator.forEachRemaining(field -> {
BanditCoefficients actionCoefficients = this.parseActionCoefficientsNode(field.getValue());
coefficients.put(field.getKey(), actionCoefficients);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while we're leaving actionKey in the action coefficients for now, that is redundant and may be later removed, so I don't want to count on it being there and instead use the Object key as the action key.

@aarsilv aarsilv marked this pull request as ready for review May 31, 2024 20:32
@aarsilv aarsilv requested a review from sameerank May 31, 2024 20:32
@aarsilv aarsilv merged commit 5ccfe02 into main May 31, 2024
3 checks passed
@aarsilv aarsilv deleted the aaron/ff-2269/coefficients-as-map branch May 31, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants