Skip to content

Path normalization (train on Windows and deploy on Linux) #541

@ViacheslavDanilov

Description

@ViacheslavDanilov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions