Giter Club home page Giter Club logo

Comments (7)

thesomamyth avatar thesomamyth commented on July 26, 2024

Hi,

I can't find any documentation on how to successfully parallelise jmetalpy. The closest thing I could find was this example here: https://jmetal.github.io/jMetalPy/api/algorithm/multiobjective/eas/nsgaii_distributed.html

But even running that exact code produces a stream of errors and doesn't actually work. I've attached a log of what happens. This is me running the program, letting it sit for a while with no seeming activity, then hitting Ctrl+C to kill it.

paralleltest.log

from jmetalpy.

benhid avatar benhid commented on July 26, 2024

Hello Dominik,

To be clear, which version of Dask are you using? In the examples folder you can find some examples about how to use PySpark and Dask to evaluate solutions in parallel, as well as a distributed version of the NSGA-II algorithm.

from jmetalpy.

thesomamyth avatar thesomamyth commented on July 26, 2024

Hi,

Thanks for the response! I have no idea how I got to that other version of the distributed algorithm, but using the links you provided produces a working example using ZDT1. Thanks for that!

I am, however, running a custom FloatProblem, and using it with the distributed NSGA-II algorithm gives me the following error:

4 cores available
Traceback (most recent call last):
  File "main.py", line 69, in <module>
    main()
  File "main.py", line 57, in main
    algorithm.run()
  File "/home/dominik/.local/share/virtualenvs/multigroup-8rF_qus2/lib/python3.8/site-packages/jmetal/algorithm/multiobjective/nsgaii.py", line 267, in run
    auxiliar_population = r.replace(auxiliar_population, offspring_population)
  File "/home/dominik/.local/share/virtualenvs/multigroup-8rF_qus2/lib/python3.8/site-packages/jmetal/util/replacement.py", line 26, in replace
    self.ranking.compute_ranking(join_population)
  File "/home/dominik/.local/share/virtualenvs/multigroup-8rF_qus2/lib/python3.8/site-packages/jmetal/util/ranking.py", line 60, in compute_ranking
    dominance_test_result = self.comparator.compare(solutions[p], solutions[q])
  File "/home/dominik/.local/share/virtualenvs/multigroup-8rF_qus2/lib/python3.8/site-packages/jmetal/util/comparator.py", line 155, in compare
    raise Exception("The solution1 is None")
Exception: The solution1 is None

Any idea as to what this might be? My custom problem inherits from FloatProblem and is only using custom init and evaluate methods. Is there anything else I need to implement to get it working in a distributed/parallel way? It works fine single-threaded.

from jmetalpy.

benhid avatar benhid commented on July 26, 2024

Hello,

I just tested the algorithm with a custom problem and it is working as expected. Can you send me an email (<antonio.benitez (at) lcc.uma.es>) with your problem implementation so I can test it on my machine? (if so, I will update this issue for future references once we find the root cause for raised exception).

Thank you!!

from jmetalpy.

ajnebro avatar ajnebro commented on July 26, 2024

Hi.
Does the error appear when using the sequential NSGA-II, or only when the distributed version is executed?

Antonio

from jmetalpy.

thesomamyth avatar thesomamyth commented on July 26, 2024

Hi,

With sequential NSGA-II it works fine.

I'm not sure I can send over my custom problem because it contains my company's IP. Would you be able to post the working problem that you used? Perhaps I can then work backwards to discover what the difference is and post a minimally reproducible example.

from jmetalpy.

erl987 avatar erl987 commented on July 26, 2024

DistributedNSGAII works well for me with dask. However, I was fully unaware of this possibility and had previously hacked my own solution to get jmetalpy working with dask.

I think it would be really useful to clarify in the documentation how the library can be used with dask in a massive-parallel way.

from jmetalpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.