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

name error in multiprocess #1

Open
ImanGarsha opened this issue Jul 8, 2023 · 1 comment
Open

name error in multiprocess #1

ImanGarsha opened this issue Jul 8, 2023 · 1 comment

Comments

@ImanGarsha
Copy link

Hi @andgoldschmidt
in block 22, example 3
with pool.Pool(6) as p: r = list(tqdm(p.imap(run_wrapper, control_list), total=n_experiments))
I got " NameError: name 'run_experiment' is not defined"

could you please support?

@andgoldschmidt
Copy link
Owner

run_experiment is defined in the previous cell 22, and run_wrapper is just a wrapper partially evaluating the arguments of run_experiment, like functools.Partial. If cell 22 executes without issue, and you find that the NameError persists, I'd be at a bit of a loss---I'd probably start by testing whether I can call run_wrapper by itself before handing it to the multi-threading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants