Skip to content

Multiprocessing error without if-clause protection on Windows #44

Closed
@TheNeeloy

Description

@TheNeeloy

Hi,

I came across an issue when training & evaluating a model on Windows 10. Specifically, if the code in train.py, evaluate,py, and visualize.py is not wrapped in some form of a main function, which is then called with if __name__ == '__main__': main(), then the code will be run multiple times and until a multiprocessing runtime error occurs.

This can be solved, as stated in the Pytorch doc here, by wrapping the code in a function, and calling it when needed.

Wasn't sure if you wanted to address the issue as I don't know how the added code will impact Linux & Mac users, but wanted to give you a heads up that this issue exists for Windows users.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions