From 41c4051e001cddf41a0ce7f19878639edbf410bb Mon Sep 17 00:00:00 2001 From: vnherdeiro Date: Wed, 28 Aug 2024 14:00:54 +0100 Subject: [PATCH 1/2] DAsk test goes to temp folder, no test artefact --- tests/python_package_test/test_dask.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python_package_test/test_dask.py b/tests/python_package_test/test_dask.py index 37d6db2541f5..caf350239940 100644 --- a/tests/python_package_test/test_dask.py +++ b/tests/python_package_test/test_dask.py @@ -1527,11 +1527,11 @@ def test_predict_with_raw_score(task, output, cluster): assert_eq(raw_predictions, pred_proba_raw) -def test_distributed_quantized_training(cluster): +def test_distributed_quantized_training(tmp_path, cluster): with Client(cluster) as client: X, y, w, _, dX, dy, dw, _ = _create_data(objective="regression", output="array") - np.savetxt("data_dask.csv", np.hstack([np.array([y]).T, X]), fmt="%f,%f,%f,%f,%f") + np.savetxt(tmp_path / "data_dask.csv", np.hstack([y[:, None], X]), fmt="%f,%f,%f,%f,%f") params = { "boosting_type": "gbdt", From c4ab1ffc1a6ecc5836e824c60e6dc5d021e7bcaf Mon Sep 17 00:00:00 2001 From: vnherdeiro Date: Thu, 29 Aug 2024 00:26:07 +0100 Subject: [PATCH 2/2] adressing PR comment --- tests/python_package_test/test_dask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python_package_test/test_dask.py b/tests/python_package_test/test_dask.py index caf350239940..247f2eb10a54 100644 --- a/tests/python_package_test/test_dask.py +++ b/tests/python_package_test/test_dask.py @@ -1531,7 +1531,7 @@ def test_distributed_quantized_training(tmp_path, cluster): with Client(cluster) as client: X, y, w, _, dX, dy, dw, _ = _create_data(objective="regression", output="array") - np.savetxt(tmp_path / "data_dask.csv", np.hstack([y[:, None], X]), fmt="%f,%f,%f,%f,%f") + np.savetxt(tmp_path / "data_dask.csv", np.hstack([np.array([y]).T, X]), fmt="%f,%f,%f,%f,%f") params = { "boosting_type": "gbdt",