DGEMO icon indicating copy to clipboard operation
DGEMO copied to clipboard

Environment error

Open sustech-lz opened this issue 1 year ago • 10 comments

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 avatar Jun 27 '23 15:06 sustech-lz

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.

sustech-lz avatar Jun 28 '23 02:06 sustech-lz

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.

yunshengtian avatar Jun 28 '23 20:06 yunshengtian

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.

sustech-lz avatar Jun 29 '23 10:06 sustech-lz

Does pip install pygco work?

yunshengtian avatar Jul 03 '23 17:07 yunshengtian

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 avatar Jul 03 '23 17:07 sustech-lz

IMG_5003

sustech-lz avatar Jul 03 '23 17:07 sustech-lz

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

CarllMC avatar Jan 06 '24 14:01 CarllMC

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

sustech-lz avatar Jan 07 '24 03:01 sustech-lz

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?

GL-Aronman avatar Mar 26 '24 07:03 GL-Aronman

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

sustech-lz avatar Mar 26 '24 07:03 sustech-lz