-
Notifications
You must be signed in to change notification settings - Fork 2
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
FF-3390 fix(python): fix typing information for Configuration.__init__ #43
Conversation
…on initialization (FF-3390)
# Note: Before publshing v5.0.0 | ||
# | ||
# Users current have to initialize the configuration like this: | ||
# | ||
# Configuration(some_bytes, some_other_bytes) | ||
# | ||
# In v5.0.0, we will add a named parameter to the constructor to make this | ||
# more clear. | ||
# | ||
# Users will be able to initialize the configuration like this: | ||
# | ||
# Configuration(flags_configuration=some_bytes, bandits_configuration=some_other_bytes) | ||
# | ||
# Changes: | ||
# | ||
# def __init__(self, *, flags_configuration: bytes, bandits_configuration: bytes | None = None) -> None: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually already has this signature, so no need to wait for v5:
https://github.com/Eppo-exp/rust-sdk/blob/427fed8fd54f3bdc7b69a9f2e198a72ef5ba4779/python-sdk/src/configuration.rs#L22
"flags": {} | ||
}).encode('utf-8') | ||
|
||
FLAGS_CONFIG_WITH_BANDITS = ufc_with_bandits = json.dumps({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double-assignment here is confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for handling this!
Just to clarify what's happening here, it's not that "configuration wrapper" didn't have the necessary parameter — it's just typing information that was out-of-sync ( |
🎫 Internal eppo ticket:
FF-3390
Observation
When using Python on version
4.0.1
(latest), unable to initialization bandit configuration from external payload.👉 Only bandit keys that have a corresponding key in the model configuration are available in the
get_bandit_keys
function.Changes
sdk-test-data
submodule to latest.