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

Add offline policy evaluation module and update dependencies #59

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

shaharbar1
Copy link
Collaborator

@shaharbar1 shaharbar1 commented Sep 10, 2024

Changes

  • Introduced offline_policy_evaluator.py with classes for propensity score estimation and offline policy evaluation.
  • Introduced offline_policy_estimator.py with classes for offline policy estimation.
  • Updated pyproject.toml to include new dependencies: bokeh and optuna. Further adjusted existing dependencies to compatible versions and added python 3.12 support.
  • Changed .pre-commit-config.yaml to utilize nbstripout instead of nbdev_clean.
  • 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 and test_offline_policy_estimator.py as a test suite for the OfflinePolicyEvaluator.
  • Added get_non_abstract_classes, visualize_via_bokeh and in_jupyter_notebook utility functions.

@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch from 41a0a84 to b8ea4dd Compare September 10, 2024 12:41
@shaharbar1 shaharbar1 added the enhancement New feature or request label Sep 10, 2024
@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch from b8ea4dd to cb05e5a Compare September 10, 2024 12:43
Copy link

@j3rom3c j3rom3c left a comment

Choose a reason for hiding this comment

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

Looks great to me, but my coding skills are not are your level. Just minor comments.
I would need a python notebook with an example to better understand how your new implementation works!

pyproject.toml Outdated Show resolved Hide resolved
tests/test_offline_policy_evaluator.py Outdated Show resolved Hide resolved
pybandits/offline_policy_evaluator.py Outdated Show resolved Hide resolved
tests/test_offline_policy_evaluator.py Outdated Show resolved Hide resolved
pybandits/offline_policy_evaluator.py Show resolved Hide resolved
@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch 14 times, most recently from b117ef0 to d5118c3 Compare September 15, 2024 11:12
@j3rom3c
Copy link

j3rom3c commented Sep 17, 2024

Mainly general comments, since I am using the library for a project:

  • a print of the current "phase" of the process ("priors update", "q computation", "propensity score computation" ... )
  • a progress bar for MC sampling
    Some processes may last because of the data (large contextual n dim ...), and it will inform user on the step currently processing ...

@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch 2 times, most recently from 2ba33e1 to d4d0dfc Compare September 23, 2024 11:08
@shaharbar1
Copy link
Collaborator Author

shaharbar1 commented Sep 23, 2024

Mainly general comments, since I am using the library for a project:

  • a print of the current "phase" of the process ("priors update", "q computation", "propensity score computation" ... )
  • a progress bar for MC sampling
    Some processes may last because of the data (large contextual n dim ...), and it will inform user on the step currently processing ...

@j3rom3c, note that:
First item - done.
Second item - this is already done using tqdm (See line #850 on offline_policy_evalutor.py).

@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch 5 times, most recently from 0d618da to 703e25a Compare September 26, 2024 10:10
@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch 17 times, most recently from 97e8e51 to c2d073f Compare October 10, 2024 08:52
@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch 11 times, most recently from 92e979a to 2f136be Compare October 28, 2024 10:19
 ### Changes
 * Introduced `offline_policy_evaluator.py` with classes for propensity score estimation and offline policy evaluation.
 * Introduced `offline_policy_estimator.py` with classes for offline policy estimation.
 * Updated `pyproject.toml` to include new dependencies: `bokeh` and `optuna`. Further adjusted existing dependencies to compatible versions and added python 3.12 support.
 * Changed .pre-commit-config.yaml to utilize nbstripout instead of nbdev_clean.
 * Added caching of dependencies on CI and CD.
 * 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 and test_offline_policy_estimator.py as a test suite for the OfflinePolicyEvaluator.
 * Added `get_non_abstract_classes` and `visualize_via_bokeh` utility functions.
@shaharbar1 shaharbar1 force-pushed the feature/offline_policy_evaluation branch from 2f136be to 74da683 Compare October 28, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants