lil-lab / cerealbar

Cereal Bar is a two-player web game designed for studying language understanding agents in collaborative interactions. This repository contains code for the game, a webapp hosting the game, the agent implementation, and recorded interactions in the game. http://lil.nlp.cornell.edu/cerealbar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

train problem about pycrayon

ChrisRanger opened this issue · comments

I launched docker container of pycrayon server folloing doc ,but the train.py also block at crayon_client: pycrayon.CrayonClient = pycrayon.CrayonClient(hostname='localhost'),I can‘t find any doc about crayon, so need help…………

I commented out lines 24 -- 37 in crayon.py but also block at crayon_client.create_experiment(),then error became ConnectionResetError:Error 104, connection reset by peer ,it looks like problem about socket or request,could you help me debug?

Hi, unfortunately I haven't ran into this error and I haven't used crayon in a while. However, I was just now able to do the following:

  1. Activate the virtual environment
  2. Start the docker environment: sudo docker run -d -p 8888:8888 -p 8889:8889 --name crayon alband/crayon (this downloaded the most recent version of the image, with sha256 94fbb99769256a96a507abbe9561390637b4b721af2f9573be3a7bb35d7acbdb)
  3. Create a client (line that you said was blocked): client = pycrayon.CrayonClient(hostname='localhost')
  4. Create an experiment: exp = client.create_experiment('test')

None of these steps were blocked. Do these steps work for you?

In the meantime, I believe pytorch has better support for Tensorboard that wasn't available when I made this repo. Here is a tutorial: https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html (I haven't tried it myself). Alternatively, I am using weights and biases (wandb.ai) to track experiments these days. Of course, both of these options require modifying my code, since it depends on crayon.

Here's crayon's repo: https://github.com/torrvision/crayon I briefly searched their issues and couldn't find anything related to the client blocking, but maybe you will find this helpful.

I followed your instruction and created a test python script, its code is

import pycrayon
import sys

def main():
    """ test crayon client-server and experiment"""
    print("start!")
    crayon_client = pycrayon.CrayonClient("localhost")
    print("client created!")
    exp = crayon_client.create_experiment('test')
    print("exp created!")

if __name__ == "__main__":
    main()

but also block at exp = crayon_client.create_experiment('test'), I am sure that I have started server container and port is right. confusing……

Hi, Sorry about this, I'm really not sure how to debug it since this code snippet works for me. You may want to contact the original authors of pycrayon, or modify the code slightly to use pytorch's support of Tensorboard or wandb. Although I may have time in the more distant future, I don't have time in the next few weeks to update my code to switch from pycrayon to another framework.

Thanks for your reply. I have started to modify the code with tensorboard. It will be solved soon.