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

set of changes related to new heldout-test feature (#300) #301

Draft
wants to merge 1 commit into
base: mpt_dj
Choose a base branch
from

Conversation

pdreiter
Copy link
Collaborator

@pdreiter pdreiter commented Apr 2, 2023

  • tested with and without heldout-test content
  • IMPACT: Changes the TestOutcome, s.t. these two cases: (without heldout tests) and (failing heldout tests) are indiscernible

- tested with and without heldout-test content
- IMPACT: Changes the TestOutcome, s.t. these two cases:
  (without heldout tests) and (failing heldout tests) are indiscernible
@pdreiter
Copy link
Collaborator Author

pdreiter commented Apr 2, 2023

This is relevant to butrs-red-team-evaluation/issues/54

if not self.__run_heldout_tests:
heldout = self.heldout_tests
valid_heldout = True if len(heldout)>0 else False

Copy link
Collaborator

Choose a reason for hiding this comment

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

Definition of valid_heldout can be simplified:

valid_heldout = bool(heldout)

Also, can we also get rid of 3/4 of the new lines to improve readability?

@@ -70,6 +72,9 @@ def __init__(self,
# FIXME used the precomputed test ordering for now
self.__test_ordering: Sequence[Test] = list(self.__problem.tests)

self.__heldout_tests: Sequence[Test] = list(self.__problem.heldout_tests)

Copy link
Collaborator

Choose a reason for hiding this comment

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

very minor quibble: remove 1/2 whitespace lines to improve readability

@@ -138,12 +143,16 @@ def _filter_redundant_tests(self,
def _run_test(self,
container: ProgramContainer,
candidate: Candidate,
test: Test
test: Test,
heldout: bool = False
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor: can we make heldout a keyword-only argument to improve readability at caller sites?

test: Test,
*,
heldout: bool = False,

@pdreiter
Copy link
Collaborator Author

pdreiter commented Apr 3, 2023

Based on conversation with @ChrisTimperley - an alternative strategy would be to use darjeeling as an interface to the docker container to evaluate patches.

@pdreiter
Copy link
Collaborator Author

pdreiter commented Apr 3, 2023

I'll be retooling this approach to reduce the impact to existing darjeeling.

@pdreiter pdreiter marked this pull request as draft April 7, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants