Skip to content

Conversation

@typotter
Copy link
Collaborator

@typotter typotter commented Apr 15, 2025

Motivation and Context

As the bandit models are updated on the server with a lower frequency than the flag configuration, oftentimes, we can avoid loading bandits as we're able to reuse the versioned bandit model.

Changes

  • JIT checking of whether existing bandit models are sufficient for reuse or if models need to be fetched
  • Renaming of fromJson to fromArray as the method takes an associative array, not a JSON string
  • Also renaming local vars from $json to $arr for increased precision

Copy link
Contributor

@aarsilv aarsilv left a comment

Choose a reason for hiding this comment

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

Great fast follow and I appreciate the renaming cleanup as well! 👏

Approving assuming you add in some clarifying comments as requested

@typotter typotter merged commit b4e2913 into main Apr 16, 2025
1 check passed
@typotter typotter deleted the tp/opt-bandit-load branch April 16, 2025 21:18
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.

4 participants