Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] - Clarify multi collector #2123

Closed
GJBoth opened this issue Apr 25, 2024 · 3 comments
Closed

[Docs] - Clarify multi collector #2123

GJBoth opened this issue Apr 25, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@GJBoth
Copy link
Contributor

GJBoth commented Apr 25, 2024

None of the docs seem to mention (at least, where I could find it), that for the MultiSyncCollector (and async) you need to run your code using:

if __name__ == "__main__":
    training_loop()

otherwise, you'll get this error:

RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

        To fix this issue, refer to the "Safe importing of main module"
        section in https://docs.python.org/3/library/multiprocessing.html
@GJBoth GJBoth added the enhancement New feature or request label Apr 25, 2024
@vmoens
Copy link
Contributor

vmoens commented Apr 26, 2024

Fair point! We should mention that

@GJBoth
Copy link
Contributor Author

GJBoth commented Apr 26, 2024

I'll prep a PR - hopefully today, if not early next week :-).

@GJBoth
Copy link
Contributor Author

GJBoth commented May 2, 2024

Closed by #2126

@GJBoth GJBoth closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants