ORNL / cyberwheel

MIT License
7 stars 0 forks source link

want to know how to run a first demo? #1

Open cimpapa opened 2 weeks ago

cimpapa commented 2 weeks ago

I have install the virtual environment and run the train script, get a web sever running. I don't know how to start a demo and get the result. image I have not read your paper, but i want to get a fast start.

cimpapa commented 2 weeks ago

just input this in terminal: python .\train_cyberwheel.py 8080 --exp-name demo_test --seed 123 --device cpu

chaulagaina commented 2 weeks ago

When you run python3 train_cyberwheel.py --exp-name demo_test --seed 123 --device cpu it should save checkpoints of your model throughout training. These are saved in your models/ directory. In order to evaluate the most recent version of your trained model and see what it is doing, you need to run python3 evaluate_cyberwheel.py --experiment demo_test --visualize. This will evaluate its performance on the network and save a log of the actions that are run at each step in the action_logs/ directory. The --visualize flag will save the graphs of the evaluation in the graphs/ directory. Now when you run the visualization server with python3 run_visualization_server.py 8080 script, it should include your experiment name in the list, allowing you to visualize agent progress.

The general pipeline to think about is Train -> Evaluate -> Visualize

cimpapa commented 2 weeks ago

ok, I know. I reset all the settings i changed, just run the script "python .\train_cyberwheel.py --exp-name demo_test --seed 123 --device cpu", it seems that some errors happen. image I don't know is the repo structure need to change or what? I can't run the train process. Before this, I move the file train_cyberwheel.py outside the directory "cyberwheel", and change some imports, it runs, but nothing display. So I confuse about how to get start this project😂. Could you write down some tutorials about how to run a demo? Thanks very much!

chaulagaina commented 2 weeks ago

Regarding a tutorial for running a demo, that's a good idea, I've just added it to the README. I did some testing on Windows and I think I may understand an issue that may be related surround pygraphviz, and I'll be pushing an update to fix it soon. I've just pushed a quick fix to the pyproject.toml file that should help with the import error if you've already gone through installing the dependencies and getting the virtual environment set up with poetry, so feel free to pull and let me know if you're still running into errors. You'll need to re-run "poetry install" for the pyproject changes to take effect.

chaulagaina commented 1 week ago

Hey @cimpapa - just checking in, did the most recent push resolve the module import issue?

I plan to push another fix this week to resolve issues related to installing the pygraphviz library on a Windows or Silicon Mac.