-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload network to server? #222
Comments
Sounds similar to the problem in #217 but @Superkidd didn't actually say how he fixed it in the end. |
BTW you don't need to rename to best-network.gz and it doesn't matter if you do. The server names each uploaded network with the hash, and stores it under networks/. For a net to become 'best' and promoted by server, you need to have it do a match and then the match successfully pass/promote the challenger. For the very first setup of the server you need to manually copy a network into networks/ and name it best-network.gz. |
@roy7 I did what you told me too. Yet, the calculated hash even with a different network uploaded is still 3ba11708... Also, I followed a more detailed instruction on how to set up the server on https://github.com/sai-dev/sai-server and still got the error. Is there anything else to change beside the QString url_server in autogtp? Plus, attached is the server log when I curled the network. |
Would you look at the download network with cat or a text editor and see if looks like a valid net? What's its file size? I'm guessing it isn't actually downloading a network so you don't see the hash changing. I'm suspecting it's downloading an error message or a null file or something? The server error about trying to access 'count' of a null variable, is because you have no games at all. Once a game exists I guess that goes away. Try changing line 611 from "set.training_count = totalgames.count;" to "set.training_count = (totalgames ? totalgames.count || 0);" That should avoid crashing on upload of network with zero games played, and thus get the game into the database... |
I've updated master branch to have everything in next branch, which could possibly have an effect. Some old next changes were related to gzip_hash I think. Yes, all the code that adds "hash_gzip_hash" field in the selfplay packet from server (missing in your log above) was only in next branch not master branch. I've merged all of next into master now. |
@gcp When autogtp downloads a network, and it uses a URL like networks/hash.gz, we have a setting in the web server that intercepts the networks/ path don't we? Because I'm not seeing a handler anywhere in the server code to serve binary files requested under the networks/ end point. Doh? |
This I think would be the key? |
SAI team fixed this bug last year, who knew? sai-dev@02f7f10 |
Yes that's handled directly by the webserver without involving node.js. Improves the memory usage. |
Thanks. I never documented that so it's why some people have failed to get the server working in the past, doh! |
Currently there's even extra tricks to "fall back" to leela.online-go.com for older networks. nginx config:
|
Thanks, good to have that documented someplace. :) Sadly it's taken over a year for me to fix this by default for new people trying to run local servers. |
@roy7 nice! |
BTW, why is 11 is on the second line of /best-nerwork-hash response? |
Might be an old protocol version number or something? I'm not actually sure any more lol. |
So, I tried to set up the LZ server locally. I managed to get everything done (I hope) except for the uploading network part. What I did was:
best-network.gz
curl -F '[email protected]' -F 'training_count=0' -F 'key=auth_key' http://localhost:8080/submit-network
best-network.gz
intoleela-zero-server/network/
directoryconst Qstring server_url = "https://zero.sjeng.org/"
to"http://localhost:8080/"
...and still got this error about mismatching in hash.
BTW, is a code of 52 I got from
curl
bad?Thanks in advance!
The text was updated successfully, but these errors were encountered: