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

Refactor out policy evaluation to separate class #364

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

boomanaiden154
Copy link
Collaborator

This patch refactors out policy evaluation in blackbox_learner to a new BlackboxEvaluator class so that we can change some details of how things are collected, particularly with regards to sampling and how samples are held.

@boomanaiden154 boomanaiden154 force-pushed the users/boomanaiden154/blackbox-evaluator branch 2 times, most recently from 5cdcfbf to ad552a2 Compare September 13, 2024 03:50
@boomanaiden154 boomanaiden154 changed the base branch from users/boomanaident154/whole-corpus-sampler to main September 16, 2024 21:51
This patch refactors out policy evaluation in blackbox_learner to a new
BlackboxEvaluator class so that we can change some details of how things
are collected, particularly with regards to sampling and how samples are
held.
This patch makes two primary changes to the CI config. It restricts the CI running on push events to only run on the main branch. This prevents the CI from running twice on PRs from branches in the main repository, which are needed for stacked PRs.

Additionally, this PR sets the permissions at the top of the file, which is a general best practice for Github workflows for security reasons.

Additionally, bump a couple of the actions that were using deprecated NodeJS versions so we do not get the warning anymore.
This patch deletes es_worker.py, which is not used anywhere, even for
testing. An exact copy of the class is in blackbox_learner_test.py for
testing purposes.
This patch replaces load_corpus_element with the (presumably) correct
function name, load_module_spec, which is defined directly below. This
seems to have been an oversight during a refactoring at some point.
Pytype complains that attribute errors are not reenabled after a
temporary disable. This patch fixes that be reenabling them so that it
stops throwing the warning while also potentially improving coverage of
the code if more is added in the future.
@boomanaiden154 boomanaiden154 force-pushed the users/boomanaiden154/blackbox-evaluator branch from ea3bb06 to 993b996 Compare September 16, 2024 21:53
@boomanaiden154 boomanaiden154 merged commit cf2f790 into main Sep 16, 2024
17 checks passed
@boomanaiden154 boomanaiden154 deleted the users/boomanaiden154/blackbox-evaluator branch September 16, 2024 22:01
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.

2 participants