Skip to content
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

How do I merge this with CodeReclaimers/neat-python master? #10

Open
nexon33 opened this issue Sep 16, 2022 · 7 comments
Open

How do I merge this with CodeReclaimers/neat-python master? #10

nexon33 opened this issue Sep 16, 2022 · 7 comments

Comments

@nexon33
Copy link

nexon33 commented Sep 16, 2022

I feel like a complete noob for asking, but after almost a whole day of trying and still failing to figure this out I figure I'd just ask.

@bennr01
Copy link
Owner

bennr01 commented Sep 16, 2022

It's been a long time since I've worked on this repository, but the rough process should look like this (assuming you want the updates for neat.distributed):

Assuming you are using git CLI:

  1. clone CodeReclaimers's repository (git clone https://github.com/CodeReclaimers/neat-python.git). If you already have a clone, you can use that. Beware that merges involving merge conflicts can easily mess up your code if you are inexperienced, so either use a separate branch or make a backup if you've made any changes to your clone/fork.
  2. inside the repository directory, add this repo (git remote add bennr01 git@github.com:bennr01/neat-python.git)
  3. checkout the branch you want to merge into (git checkout master)
  4. fetch and merge the changes (either git pull bennr01 distributed_socket or git fetch bennr01 && git merge bennr01/distributed_socket).
  5. As this will result in a merge conflict, you'll need to resolve that one. I believe it should be enough to take all changes to neat/distributed.py and discard all changes to .travis.yml, but I'm not sure. Once you've resolved all conflicts (beware: text files will be modifed, be sure that you've removed the various markers in the file), commit the changes git commit (then enter a message, save and quit).
  6. Done.

The quick & dirty way

If you don't care about the correct git history or that the tests may fail, you can simply copy the neat/distributed.py file from this repository (raw version here) and replace it in the base repository. You'll need to change any use of authkey in the example to unicode.

@nexon33
Copy link
Author

nexon33 commented Sep 16, 2022

Okay thanks! it does seem to work, I seperated the primary and secondary clients in 2 files. I start both and when I quit the secondary client then it throws an error in the primary client instead of trying to reconnect (the master code does this, but only sometimes succesfully). I'm currently trying to fix that somehow but I'm not really confident I'll be able to.

@nexon33
Copy link
Author

nexon33 commented Sep 16, 2022

Any chance you can fix this for me? I can offer you some money if you manage to get NEAT running in a way that allows the clients to lose connection and be able to always reconnect. Not a lot of money but money none the less

@bennr01
Copy link
Owner

bennr01 commented Sep 16, 2022

I can take a look once I've got some time, but you don't have to offer me any money for this. Simply asking would have been enough. BTW, have you set reconnect=True in the .start() method?

@nexon33
Copy link
Author

nexon33 commented Sep 16, 2022

Yes I did try that already, I'll check it out tomorrow again im going to look through the what must already be 30 cloned repos I editted. I did also get the latest version running without socks but with reconnects (only sometimes visible)

The other times it didn't reconnect but I could see a seperate thread being spawned and removed about once a second.

@nexon33
Copy link
Author

nexon33 commented Sep 16, 2022

okay so it is running this in linux which works, I commented out the secondary processes from the file running on linux (WSL) and then commented out the primary process on windows and with only the secondary process it does what it has to do without any weird errors.

the current behaviour is almost as desired except for the fact that when I stop debugging the windows process (secondary process) it only sometimes reconnects and sometimes it kind of reconnects (I can see threads being generated in the debugger of the primary script) but there is no useful processing being done anymore.

edit: I've also narrowed down that the problem is somewhere in the primary node, I do not know where however

@nexon33
Copy link
Author

nexon33 commented Sep 27, 2022

any eta on when you'd pick this up? If its gonna be a while I should probably look for another solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants