-
Notifications
You must be signed in to change notification settings - Fork 896
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
[tabular] add infer throughput logging #4200
Conversation
|
|
Job PR-4200-9d2669d is done. |
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!
""" | ||
y_pred_proba = self.predict_proba(X, **kwargs) | ||
y_pred = get_pred_from_proba(y_pred_proba=y_pred_proba, problem_type=self.problem_type) | ||
return y_pred | ||
|
||
def predict_proba(self, X, normalize=None, **kwargs) -> np.ndarray: | ||
def predict_proba(self, X, *, normalize: bool | None = None, record_time: bool = False, **kwargs) -> np.ndarray: |
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.
why do we not set the record_time
as true and by default record the time taken for prediction?
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.
Because calling time.time
takes time, and predict
is something we want to take as little time as possible for the user.
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
Issue #, if available:
Resolves #4162
Description of changes:
Mainline:
This PR:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.