Run linters with the multi output demo. (#8966)

This commit is contained in:
Jiaming Yuan 2023-03-28 00:47:28 +08:00 committed by GitHub
parent acc110c251
commit 401ce5cf5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -46,7 +46,7 @@ def gen_circle() -> Tuple[np.ndarray, np.ndarray]:
return X, y
def rmse_model(plot_result: bool, strategy: str):
def rmse_model(plot_result: bool, strategy: str) -> None:
"""Draw a circle with 2-dim coordinate as target variables."""
X, y = gen_circle()
# Train a regressor on it
@ -120,10 +120,10 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--plot", choices=[0, 1], type=int, default=1)
args = parser.parse_args()
# Train with builtin RMSE objective
# - One model per output.
rmse_model(args.plot == 1, "one_output_per_tree")
# - One model for all outputs, this is still working in progress, many features are
# missing.
rmse_model(args.plot == 1, "multi_output_tree")

View File

@ -161,6 +161,7 @@ def main(args: argparse.Namespace) -> None:
"demo/guide-python/spark_estimator_examples.py",
"demo/guide-python/individual_trees.py",
"demo/guide-python/quantile_regression.py",
"demo/guide-python/multioutput_regression.py",
# CI
"tests/ci_build/lint_python.py",
"tests/ci_build/test_r_package.py",
@ -204,6 +205,7 @@ def main(args: argparse.Namespace) -> None:
"demo/guide-python/feature_weights.py",
"demo/guide-python/individual_trees.py",
"demo/guide-python/quantile_regression.py",
"demo/guide-python/multioutput_regression.py",
# tests
"tests/python/test_dt.py",
"tests/python/test_data_iterator.py",