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

Error test_search #4

Open
gazzola opened this issue Mar 13, 2020 · 4 comments
Open

Error test_search #4

gazzola opened this issue Mar 13, 2020 · 4 comments

Comments

@gazzola
Copy link

gazzola commented Mar 13, 2020

When I run test_search () it gives error `` AttributeError: Can't pickle local object 'test_search. . ´´

Can you help me solve the problem? Why do you give this error?
How can I solve, do I need some other file?

----- Chinese
當我運行test_search()時,出現錯誤``AttributeError:無法醃製本地對象'test_search。。´´

你能幫我解決問題嗎? 為什麼會出現此錯誤?
我該如何解決,我需要其他文件嗎?
Dāng wǒ yùnxíng test_search() shí, chūxiàn cuòwù ``AttributeError: Wúfǎ yān zhì běndì duìxiàng'test_search..´´

@weihongwei0586
Copy link

weihongwei0586 commented Mar 16, 2020

Maybe the multiprocessing causes this, you can try to set the parameter processes = proc = 1

@weihongwei0586
Copy link

1

When I run test_search () it gives error `` AttributeError: Can't pickle local object 'test_search. . ´´

Can you help me solve the problem? Why do you give this error?
How can I solve, do I need some other file?

----- Chinese
當我運行test_search()時,出現錯誤``AttributeError:無法醃製本地對象'test_search。。´´

你能幫我解決問題嗎? 為什麼會出現此錯誤?
我該如何解決,我需要其他文件嗎?
Dāng wǒ yùnxíng test_search() shí, chūxiàn cuòwù ``AttributeError: Wúfǎ yān zhì běndì duìxiàng'test_search..´´

Maybe the multiprocessing causes this, you can try to set the parameter processes = proc = 1

@dai-pch
Copy link
Owner

dai-pch commented Mar 16, 2020

@gazzola Sorry to be late.
@Hongwei-Wei is right. This problem is due to a limitation of python that lambda function can not be used in multiprocess. The test_search() function is write before i change the grid_search to multiprocess, so i forget to fix it.
There are two solutions. First is to run with only one thread as @Hongwei-Wei said. The second one is replacing the lambda function in "test_search" function into a normal function.

@gazzola
Copy link
Author

gazzola commented Mar 16, 2020

thank you !!

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

3 participants