msu-coinlab / pymop

Single- as well as Multi-Objective Optimization Test Problems: ZDT, DTLZ, CDTLZ, CTP, BNH, OSY, ...
https://www.egr.msu.edu/coinlab/blankjul/pymop/
Apache License 2.0
79 stars 13 forks source link

The issue about return the gradient of the objective functions #9

Open YijunRan opened 4 years ago

YijunRan commented 4 years ago

Hi, When I return the "dF", the autograd.tracer will generate the issues about the argument. For example, F, G, CV, dF = problem.evaluate(np.random.random((100, 4)), return_values_of=["F", "G", "CV", "dF"]) This will report the issue as following: File "/Users/lok288/anaconda3/lib/python3.7/site-packages/autograd/tracer.py", line 28, in new_root root.initialize_root(*args, **kwargs) TypeError: initialize_root() takes 1 positional argument but 2 were given Please tell me how to do it? Thank you! Yijun

blankjul commented 4 years ago

Can you give me a source code example to reproduce the error?

I recommend using our new framework pymoo (pymoo.org) which also contains all the problems and is being maintained more frequently.