I trained models on Windows, then I tried to use them on Linux, however, I could not load them due to an incorrect path joining. During model loading, I got learner_path in the following format experiments_dir/model_1/100_LightGBM\\learner_fold_0.lightgbm. The last two slashes were incorrectly concatenated with the rest part of the path. In this regard, I would suggest adding something like learner_subpath = learner_subpath.replace("\\", "/") before this code line. Though, there is a need to think about opposite cases: when a model is trained on Linux and then is used on Windows.
I trained models on Windows, then I tried to use them on Linux, however, I could not load them due to an incorrect path joining. During model loading, I got
learner_pathin the following formatexperiments_dir/model_1/100_LightGBM\\learner_fold_0.lightgbm. The last two slashes were incorrectly concatenated with the rest part of the path. In this regard, I would suggest adding something likelearner_subpath = learner_subpath.replace("\\", "/")before this code line. Though, there is a need to think about opposite cases: when a model is trained on Linux and then is used on Windows.