Skip to content

Commit

Permalink
pass args to sklearn _autolog
Browse files Browse the repository at this point in the history
Signed-off-by: Junwen Yao <jwyiao@gmail.com>
  • Loading branch information
jwyyy committed Oct 12, 2021
1 parent cb7d288 commit 0a84115
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion mlflow/xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def autolog(
exclusive=False,
disable_for_unsupported_versions=False,
silent=False,
max_tuning_runs=5,
): # pylint: disable=W0102,unused-argument
"""
Enables (or disables) and configures autologging from XGBoost to MLflow. Logs the following:
Expand Down Expand Up @@ -403,6 +404,8 @@ def autolog(
:param silent: If ``True``, suppress all event logs and warnings from MLflow during XGBoost
autologging. If ``False``, show all events and warnings during XGBoost
autologging.
:param max_tuning_runs: integer, passed to mlflow.sklearn.
Enable autologging for XGBoost sklearn estimators.
"""
import xgboost
import numpy as np
Expand Down Expand Up @@ -574,5 +577,16 @@ def infer_model_signature(input_example):

# initialize autologging for XGBoost sklearn estimators
import mlflow.sklearn
mlflow.sklearn._autolog(xgboost_estimator=True)
mlflow.sklearn._autolog(
log_input_examples=log_input_examples,
log_model_signatures=log_model_signatures,
log_models=log_models,
disable=disable,
exclusive=exclusive,
disable_for_unsupported_versions=disable_for_unsupported_versions,
silent=silent,
max_tuning_runs=max_tuning_runs,
log_post_training_metrics=True,
xgboost_estimator=True,
)

0 comments on commit 0a84115

Please sign in to comment.