Git Product home page Git Product logo

Comments (7)

artemispax avatar artemispax commented on July 19, 2024

Right now the selfplay function only plays 1 game per call.

I seem to recall that we did this because there was some memory leak somewhere. @amj -- do you remember the reason for playing one game / call?

This is a lot faster than loading the model every time we play a game.

Did you get a chance to profile the change? What's the difference?

from minigo.

weedwind avatar weedwind commented on July 19, 2024

@Kashomon If I need to reload the model for each game, it takes time to distribute the model across gpus compared with only loading it once.

from minigo.

amj avatar amj commented on July 19, 2024

no it's not a memory leak, but we'd need to change our cluster management/expectations around the pod lifecycle. Actually, now that we check how many games are played at the beginning of selfplay and quit accordingly, this could work.

I think the savings here are the startup costs + the scheduling costs from k8s, times the number of nodes. On 9s that's 5s out of ~300s or ~1%. On 19x it would probably be less, maybe 20s out of 1200?

Also, @weedwind are you loading the model from a local file? Or a gcs bucket?

(Distributed GPUs! What kind of performance numbers are you seeing vs using a single GPU?)

from minigo.

weedwind avatar weedwind commented on July 19, 2024

@amj I can run the code both from my local machine with 2 1080 GPUs, and also on Amazon AWS (16 K80). When I say "distribute", I simply mean the startup cost to copy the models to these GPUs.

from minigo.

weedwind avatar weedwind commented on July 19, 2024

@amj Using more gpus does not improve the speed, probably because I was training a 9 by 9 board, and loading the model to 16 gpus took more time than 2 gpus.

from minigo.

brilee avatar brilee commented on July 19, 2024

We used to play 8 or more games in parallel; we dialed it down to 1 for data freshness reasons - you don't want to be generating game data using model generation 17 when generation 18 or 19 is available.

Also, we were playing 9s on CPU, which mean that the overhead was not that big relative to the CPU playout time for 1 game. The balance is skewed towards higher overhead with a 1080 as you can see.

from minigo.

amj avatar amj commented on July 19, 2024

@weedwind right, this code is for the 19x19 pipeline, where a worker plays a game, exits, and a new worker starts up, checks for if a newer models exists, etc.

Are there further issues on this? it looks like you were able to play multiple games without issue? Please re-open if there are further questions

from minigo.

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.