rl_client Reference¶
- class rl_client.Configuration¶
Container class for all configuration values. Generally is constructed from client.json file read from disk
- get(self: rl_client.Configuration, name: str, defval: str) str ¶
Get a config value or default.
- Parameters:
name – Name of configuration value to get
defval – Value to return if name does not exist
- Returns:
string value from config
- set(self: rl_client.Configuration, arg0: str, arg1: str) None ¶
- class rl_client.LiveModel¶
- choose_rank(*args, **kwargs)¶
Overloaded function.
choose_rank(self: rl_client.LiveModel, context: str, event_id: str, deferred: bool = False) -> reinforcement_learning::ranking_response
Request prediction for given context and use the given event_id
- rtype:
choose_rank(self: rl_client.LiveModel, context: str, deferred: bool = False) -> reinforcement_learning::ranking_response
Request prediction for given context and let an event id be generated
- rtype:
- refresh_model(self: rl_client.LiveModel) None ¶
- report_action_taken(self: rl_client.LiveModel, event_id: str) None ¶
- report_outcome(*args, **kwargs)¶
Overloaded function.
report_outcome(self: rl_client.LiveModel, event_id: str, outcome: str) -> None
report_outcome(self: rl_client.LiveModel, event_id: str, outcome: float) -> None
report_outcome(self: rl_client.LiveModel, episode_id: str, event_id: str, outcome: float) -> None
- request_episodic_decision(self: rl_client.LiveModel, event_id: str, previous_id: str, context: str, episode: reinforcement_learning::episode_state) reinforcement_learning::ranking_response ¶
- class rl_client.RankingResponse¶
- property actions_probabilities¶
The list of action ids and corresponding probabilities
- property event_id¶
Either the supplied event ID or auto generated if none was given
- Return type:
- rl_client.create_config_from_json(config_json: str) rl_client.Configuration ¶
Parse the input as JSON and return an
rl_client.Configuration
object which contains each field.- Parameters:
config_json – JSON string to parse
- Returns:
rl_client.Configuration
object containing parsed values