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

Environment error #6

Open
sustech-lz opened this issue Jun 27, 2023 · 10 comments
Open

Environment error #6

sustech-lz opened this issue Jun 27, 2023 · 10 comments

Comments

@sustech-lz
Copy link

ParetoDiscovery optimizing: generation 2Traceback (most recent call last):
File "/Users/zhengli/Desktop/Code/DGEMO-master/main.py", line 57, in
main()
File "/Users/zhengli/Desktop/Code/DGEMO-master/main.py", line 45, in main
X_next, Y_next = next(solution)
File "/Users/zhengli/Desktop/Code/DGEMO-master/mobo/mobo.py", line 105, in solve
solution = self.solver.solve(surr_problem, X, Y)
File "/Users/zhengli/Desktop/Code/DGEMO-master/mobo/solver/solver.py", line 39, in solve
res = minimize(problem, algo, ('n_gen', self.n_gen))
File "/Users/zhengli/anaconda3/lib/python3.10/site-packages/pymoo/optimize.py", line 65, in minimize
res = algorithm.solve()
File "/Users/zhengli/anaconda3/lib/python3.10/site-packages/pymoo/model/algorithm.py", line 183, in solve
self._solve(self.problem)
File "/Users/zhengli/anaconda3/lib/python3.10/site-packages/pymoo/model/algorithm.py", line 264, in _solve
self.next()
File "/Users/zhengli/anaconda3/lib/python3.10/site-packages/pymoo/model/algorithm.py", line 235, in next
self._next()
File "/Users/zhengli/Desktop/Code/DGEMO-master/mobo/solver/pareto_discovery/pareto_discovery.py", line 463, in _next
p.start()
File "/Users/zhengli/anaconda3/lib/python3.10/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Users/zhengli/anaconda3/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Users/zhengli/anaconda3/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
return Popen(process_obj)
File "/Users/zhengli/anaconda3/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/Users/zhengli/anaconda3/lib/python3.10/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/Users/zhengli/anaconda3/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Users/zhengli/anaconda3/lib/python3.10/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'GaussianProcess.init..constrained_optimization'

@sustech-lz
Copy link
Author

Just to follow up on this, I just wonder if it's caused by an issue with the version of the python environment when install the file.

@yunshengtian
Copy link
Owner

I believe it could be either a python version or an operating system issue. Are you using windows? I remember pickle with multiprocessing could have some issues depending on how the operating system implements multiprocessing.

@sustech-lz
Copy link
Author

Thanks for receiving your reply. Seeing the advantages of the DGEMO algorithm, I really hope to use the DGEMO algorithm you provided in my future work. I have only run it on the MacOS, and then I will install and try it on my server in Linux system. Also, may I ask where you downloaded the pygco package? I did not see any relevant content from the environment.yml you provided.

@yunshengtian
Copy link
Owner

Does pip install pygco work?

@sustech-lz
Copy link
Author

sustech-lz commented Jul 3, 2023

Thank you very much for answering the questions. The pygco installation package has been successfully installed through github. I think the problem causing _K_inv may be caused by not initializing line 65 of gp._K_inv in the gaussian_process.py file, after modifying the code, main.py can run normally on our server.

@sustech-lz
Copy link
Author

IMG_5003

@CarllMC
Copy link

CarllMC commented Jan 6, 2024

Hi zhengli, I seem to be experiencing the same problem, can you provide a more detailed solution, appreciate it!

@sustech-lz
Copy link
Author

Hi CarllMC, perhaps you can refer to these: https://github.com/Borda/pyGCO, https://pypi.org/project/pygco/.

@GL-Aronman
Copy link

HI yunshengtian and sustech-lz ,I met the same problem, seems that install pygco acordding to https://github.com/Borda/pyGCO didn't work,Will installing pygco solve the problem?

@sustech-lz
Copy link
Author

Hi GL-Aronman, hope this file will help you.
https://drive.google.com/drive/folders/185rwL3DnDn4Uo5CxS_WLbfaoy4gZgmPf?usp=sharing

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

4 participants