Git Product home page Git Product logo

openclga's People

Contributors

jbylicki avatar john-hu avatar kilikkuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openclga's Issues

Exception Tcl_AsyncDelete: async handler deleted by the wrong thread

Exception ignored in: <bound method Image.__del__ of <tkinter.PhotoImage object at 0x000001FA57641668>>
Traceback (most recent call last):
  File "D:\Program Files\Python35\lib\tkinter\__init__.py", line 3356, in __del__
    self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread

[meta] generalize tsp_cl_algo as a GA algorithm

  • separate crossover, mutation, fitness as three files
  • implement non-repeatable crossover
  • implement non-repeatable mutation
  • implement repeatable crossover
  • implement repeatable mutation
  • generate gene/chromosome struct according to gene.py and chromoosome.py
  • generate kernel entry function according to properties of algorithm.py.
    • crossover function,
    • mutation function, etc

worker disconnected is not dispatched when we use ctrl+c to stop it

[server_loop] TaskThread : start executing ... task (1)
[httpwsserver] TaskThread : running ...
[INFO] Http server is created @ port 8000.
adding task(2) to ...[httpwsserver]
[httpwsserver] TaskThread : start executing ... task (2)
Press prepare    + <Enter> to prepare
Press run        + <Enter> to run
Press restore    + <Enter> to restore
Press pause      + <Enter> to pause
Press save       + <Enter> to save (filename:test%d%d.pickle)
Press stop       + <Enter> to stop
Press get_st     + <Enter> to get statistics
Press get_best   + <Enter> to get best
Press ctrl       + c       to exit
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui
127.0.0.1 - - [13/May/2017 23:19:11] "GET / HTTP/1.1" 200 -
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/static/js/main.c1e1ba0d.js
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/static/css/main.5da4bf40.css
127.0.0.1 - - [13/May/2017 23:19:11] "GET /static/js/main.c1e1ba0d.js HTTP/1.1" 200 -
127.0.0.1 - - [13/May/2017 23:19:11] "GET /static/css/main.5da4bf40.css HTTP/1.1" 200 -
127.0.0.1 - - [13/May/2017 23:19:12] "GET / HTTP/1.1" 101 -
127.0.0.1 - - [13/May/2017 23:19:12] websocket connected
[INFO] WS Controller ('127.0.0.1', 52757) is on !! 
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/favicon-16x16.png
127.0.0.1 - - [13/May/2017 23:19:12] "GET /favicon-16x16.png HTTP/1.1" 200 -
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/favicon-96x96.png
127.0.0.1 - - [13/May/2017 23:19:12] "GET /favicon-96x96.png HTTP/1.1" 200 -
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/favicon-32x32.png
127.0.0.1 - - [13/May/2017 23:19:12] "GET /favicon-32x32.png HTTP/1.1" 200 -
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/android-icon-192x192.png
127.0.0.1 - - [13/May/2017 23:19:12] "GET /android-icon-192x192.png HTTP/1.1" 200 -
[('127.0.0.1', 52775)] Connected !
[('127.0.0.1', 52776)] Connected !
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'CPU', 'platform': 'Apple', 'name': 'Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz', 'ip': '127.0.0.1', 'worker': '988169d037ef11e784f0542696d3ed23'}}
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'GPU', 'platform': 'Apple', 'name': 'HD Graphics 4000', 'ip': '127.0.0.1', 'worker': '9882e29c37ef11e78dab542696d3ed23'}}
[('127.0.0.1', 52786)] Connected !
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'CPU', 'platform': 'Apple', 'name': 'Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz', 'ip': '127.0.0.1', 'worker': 'b2ea153837ef11e79efa542696d3ed23'}}
[('127.0.0.1', 52796)] Connected !
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'CPU', 'platform': 'Apple', 'name': 'Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz', 'ip': '127.0.0.1', 'worker': 'c6bff50037ef11e7a961542696d3ed23'}}
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/static/js/main.c1e1ba0d.js.map
127.0.0.1 - - [13/May/2017 23:21:10] "GET /static/js/main.c1e1ba0d.js.map HTTP/1.1" 200 -
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui/static/css/main.5da4bf40.css.map
127.0.0.1 - - [13/May/2017 23:21:10] "GET /static/css/main.5da4bf40.css.map HTTP/1.1" 200 -
trying to access /Users/hchu/git/python/oclGA/OpenCLGA/ui
127.0.0.1 - - [13/May/2017 23:21:33] "GET / HTTP/1.1" 200 -
[INFO] WS Controller is off, clean up all websockets !! 
127.0.0.1 - - [13/May/2017 23:21:33] websocket closed
127.0.0.1 - - [13/May/2017 23:21:34] "GET / HTTP/1.1" 101 -
127.0.0.1 - - [13/May/2017 23:21:34] websocket connected
[INFO] WS Controller ('127.0.0.1', 52906) is on !! 
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'CPU', 'platform': 'Apple', 'name': 'Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz', 'ip': '127.0.0.1', 'worker': '988169d037ef11e784f0542696d3ed23'}}
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'GPU', 'platform': 'Apple', 'name': 'HD Graphics 4000', 'ip': '127.0.0.1', 'worker': '9882e29c37ef11e78dab542696d3ed23'}}
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'CPU', 'platform': 'Apple', 'name': 'Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz', 'ip': '127.0.0.1', 'worker': 'b2ea153837ef11e79efa542696d3ed23'}}
[INFO] Send to Controller : {'type': 'workerConnected', 'data': {'type': 'CPU', 'platform': 'Apple', 'name': 'Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz', 'ip': '127.0.0.1', 'worker': 'c6bff50037ef11e7a961542696d3ed23'}}

Improve UI performance

We use main-thread to handle all messages from websocket. It would be nice to handle the data at batch. Because the message from web worker may be too fast that a redux cannot handle it with clone or immutable structure. We can aggregate some of them and process them in a batch.

add more performance index for GA

As a user, I would like to see the performance of each generation. It would be ok to see it at console. But it would be great to see it as a GUI chart.

Elitism mode

as a user, I would like to share top N chromosomes among all devices to boost the performance.

SomeFeatures

Hello,

This is an interesting project. Some questions:

  1. How PyOpenCL compatible with NVidia Card ?

  2. Is the objective function "converted/implemented" on the GPU side (evaluation is done on GPU) ?

Thanks, regards

distributed GA

As a user, I would like to connect all of my devices to run a single GA model.

Stabililize server/client socket connection

We could improve it in some parts.

  1. Add heartbeat mechanism to keep server / client connection alive
  2. Send/Recv data in {Server,Client} should be separate in different threads.
  3. Considering epoll to improve performance.

extinction mode

As a user, I would like to extinct some chromosomes if they are too similar to each other.

test and support UI viewer mode

As a user, I would like to have multiple web console to see the results. Only one can be the controller and others are viewer.

charts at UI

  • We need detail performance chart of each device
  • We need overall performance chart accumulated by time, 5 sec by default.

Make "MessageHandler.sendq" thread-safe.

We're append data to sendq in A thread but consuming sendq in B thread.
Even further, now we check the length of sendq to decide if the socket is ok to be closed.

We should make it thread-safe.

add more early termination criteria

As a user, I would like to terminate the calculation if one the following cases:

  • the best solution keeps the same after Nth generations
  • the maximum time that I can wait
  • expected fitness value found

reverse the min/max calculation

Currently, we use TSP as an example which tries to minimize the path. This doesn't follow the convention of GA. GA tries maximize the fitness value. We should reverse our implementation to follow the convention of GA.

more documents and wikis

it's time to write docs more than codes.

  • comments of codes
  • getting started (add distributed mode, install and run our example) (@kilikkuo)
  • tutorial: how to write a GA application with OpenCLGA (write a new code) (@john-hu)
  • home page with jekyll
  • API doc (if possible, doxygen)

add unit test

  • python unit test
  • opencl unit test

as a contributor, I would like to run the test cases before contributing my code to repo for preventing breaks.

rename the function names

Some functions at utils do the generic things, like custom_crossover does non-repeatable element cross over. We should rename all of them to reflect their intrinsic.

try to use pyopencl -D to define preprocess definitions.

kilik had found a way to define preprocessor definition at python, see #9 .

size = 100
clProg = cl.Program(ctx, fstr).build(options="-D GLOBAL_SIZE={0}".format(size))

Currently, we use code generation to put all preprocessor definitions. If possible, we should use build options to do so. I cannot make sure how long it can use or any limitation at that.

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.