-
Notifications
You must be signed in to change notification settings - Fork 52
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: Remove tuple option for Type[AcquisitionFunction], as this … #715
Conversation
…can be done by partial
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #715 +/- ##
==========================================
- Coverage 65.15% 65.11% -0.04%
==========================================
Files 427 427
Lines 28690 28692 +2
==========================================
- Hits 18692 18683 -9
- Misses 9998 10009 +11
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice change, thanks for doing it. One comment I have is that I beliebve the right typing is actually: Callable[[Any], ScoringFunction]
since we pass a constructor which will generate an instance of the ScoringFunction
@@ -75,7 +75,7 @@ def __init__( | |||
estimators: Dict[str, Estimator], | |||
mode: Optional[List[str]] = None, | |||
points_to_evaluate: Optional[List[Dict[str, Any]]] = None, | |||
scoring_class_and_args: Optional[ScoringClassAndArgs] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the right typing is actually: Callable[[Any], ScoringFunction]
since we are passing a constructor to the scoring function not an instance of the scoring function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, good point
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: ScoringFunctionConstructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change ScoringFunctionCreator
to ScoringFunctionConstructor
. In most cases what is passed is actually the vanilla constructor and it will make it clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…can be done by partial
Follow-up on recent PR by Jacek: Use of
partial
is more elegant.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.