Skip to content

Commit

Permalink
Add offline policy evaluation module and update dependencies
Browse files Browse the repository at this point in the history
 ### Changes
 * Introduced `offline_policy_evaluator.py` with classes for propensity score estimation and offline policy evaluation.
 * Updated `pyproject.toml` to include new dependencies: `bokeh`, `obp` and `optuna`. Further adjusted existing dependencies to compatible versions.
 * Added class method to PyBanditsBaseModel on base.py to allow seeing default values for arguments that were not passed to the model.
 * Added test_offline_policy_evaluator.py as a test suite for the OfflinePolicyEvaluator.
 * Added `visualize_via_bokeh` and `in_jupyter_notebook` utility functions.
  • Loading branch information
shaharbar1 authored and Shahar-Bar committed Sep 26, 2024
1 parent cddda5c commit 703e25a
Show file tree
Hide file tree
Showing 5 changed files with 1,449 additions and 3 deletions.
4 changes: 4 additions & 0 deletions pybandits/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ class PyBanditsBaseModel(BaseModel, extra="forbid"):
"""
BaseModel of the PyBandits library.
"""

@classmethod
def _get_value_with_default(cls, key: str, values: Dict[str, Any]) -> Any:
return values.get(key, cls.model_fields[key].default)
Loading

0 comments on commit 703e25a

Please sign in to comment.