Skip to content

[python-package] On Windows, lightgbm-4.6.0-cpu_py_1 from conda-forge Training Fails with Boost Filesystem Path Encoding Error #6881

@sdjafkhk

Description

@sdjafkhk

Description

During LightGBM model training, an exception occurs when creating cache directories, caused by invalid path syntax with non-UTF8 characters.
Error Message:boost::filesystem::create_directories: The filename, directory name, or volume label syntax is incorrect. [system:123]: "C:\Users\l\AppData\Roaming\boost_compute\0\x91\0I0???"
Interpreted Error Context:
The original GBK-encoded error message \xce\xc4\xbc\xfe\xc3\xfb\xa1\xa2\xc4\xbf\xc2\xbc\xc3\xfb\xbb\xf2\xbe\xed\xb1\xea\xd3\xef\xb7\xa8\xb2\xbb\xd5\xfd\xc8\xb7\xa1\xa3 translates to:
"The filename, directory name, or volume label syntax is incorrect."

Reproducible example

import lightgbm as lgb
params = {
'objective': 'binary',
'num_iterations': 100,
'verbose': 1
}

Sample data

import numpy as np
X = np.random.rand(1000, 10)
y = np.random.randint(2, size=1000)
train_data = lgb.Dataset(X, label=y)

Trigger error

lgb.train(params, train_data) # Fails during cache directory creation

Expected Behavior
LightGBM should automatically create cache directories with valid pathnames and complete training successfully.

Environment info

OS: Windows 11

LightGBM Version: lightgbm-4.6.0-cpu_py_1 from conda-forge

Python Version: 3.12.9

LightGBM version or commit hash:

Command(s) you used to install LightGBM
conda install lightgbm

Additional Comments

when pip install lightgbm,then it works very good

Metadata

Metadata

Assignees

Labels

gpu (OpenCL)Issue is related to the OpenCL-based GPU variant.question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions