Cannot start training successfully
stoneyang opened this issue ยท 4 comments
Hi, @XHUJOY
Thanks for sharing your cool work!
I ran into it and quickly deployed the running environment as README.
Unfortuately, I cannot start training successfully right now :(
So, could you help me to figure it out? Thanks in advance. :-)
First, I downloaded linux version of SC2 from here, the ladder maps, and the mini maps, and unzip them accordingly.
Then, I did successfully downloaded and installed pysc2. When typing python -m pysc2.bin.agent --map Simple64
, following messages flies by:
Version: B56787 (SC2.3.17)
Build: Aug 25 2017 15:00:49
Command Line: '"/opt/share0/data/SC2/StarCraftII/Versions/Base56787/SC2_x64" -listen 127.0.0.1 -port 16333 -dataDir /opt/share0/data/SC2/StarCraftII/ -tempDir /tmp/sc-RJxxSV/ -displayMode 0'
Starting up...
Startup Phase 1 complete
Startup Phase 2 complete
Creating stub renderer...
Listening on: 127.0.0.1:16333 (16333)
Startup Phase 3 complete. Ready for commands.
Requesting to join a single player game
Configuring interface options
Configure: raw interface enabled
Configure: feature layer interface enabled
Configure: score interface enabled
Configure: render interface disabled
Entering load game phase.
Launching next game.
Next launch phase started: 2
Next launch phase started: 3
Next launch phase started: 4
Next launch phase started: 5
Next launch phase started: 6
Next launch phase started: 7
Next launch phase started: 8
Game has started.
Sending ResponseJoinGame
Performing a full restart of the game.
Launching next game.
Next launch phase started: 2
Next launch phase started: 3
Next launch phase started: 4
Next launch phase started: 5
Next launch phase started: 6
Next launch phase started: 7
Next launch phase started: 8
Game has started.
RequestQuit command received.
Closing Application...
WARNING:root:Terminating attempt 0...
WARNING:root:Terminated.
0/no_op ()
1/move_camera (1/minimap [64, 64])
2/select_point (6/select_point_act [4]; 0/screen [84, 84])
3/select_rect (7/select_add [2]; 0/screen [84, 84]; 2/screen2 [84, 84])
4/select_control_group (4/control_group_act [5]; 5/control_group_id [10])
5/select_unit (8/select_unit_act [4]; 9/select_unit_id [500])
230/Effect_Spray_screen (3/queued [2]; 0/screen [84, 84])
264/Harvest_Gather_screen (3/queued [2]; 0/screen [84, 84])
12/Attack_screen (3/queued [2]; 0/screen [84, 84])
331/Move_screen (3/queued [2]; 0/screen [84, 84])
332/Move_minimap (3/queued [2]; 1/minimap [64, 64])
333/Patrol_screen (3/queued [2]; 0/screen [84, 84])
334/Patrol_minimap (3/queued [2]; 1/minimap [64, 64])
13/Attack_minimap (3/queued [2]; 1/minimap [64, 64])
274/HoldPosition_quick (3/queued [2])
451/Smart_screen (3/queued [2]; 0/screen [84, 84])
52/Build_Extractor_screen (3/queued [2]; 0/screen [84, 84])
452/Smart_minimap (3/queued [2]; 1/minimap [64, 64])
453/Stop_quick (3/queued [2])
6/select_idle_worker (10/select_worker [4])
9/select_larva ()
335/Rally_Units_screen (3/queued [2]; 0/screen [84, 84])
336/Rally_Units_minimap (3/queued [2]; 1/minimap [64, 64])
343/Rally_Workers_screen (3/queued [2]; 0/screen [84, 84])
344/Rally_Workers_minimap (3/queued [2]; 1/minimap [64, 64])
467/Train_Drone_quick (3/queued [2])
168/Cancel_Last_quick (3/queued [2])
51/Build_EvolutionChamber_screen (3/queued [2]; 0/screen [84, 84])
84/Build_SpawningPool_screen (3/queued [2]; 0/screen [84, 84])
483/Train_Overlord_quick (3/queued [2])
11/build_queue (11/build_queue_id [10])
59/Build_Hatchery_screen (3/queued [2]; 0/screen [84, 84])
269/Harvest_Return_quick (3/queued [2])
Took 46.603 seconds for 2500 steps: 53.645 fps
Wrote replay to: /opt/share0/data/SC2/StarCraftII/Replays/RandomAgent/Simple64_2017-09-14-07-14-21.SC2Replay
Seems ok and I moved to pysc2-agents and typed python -m main --map=MoveToBeacon
to start training and the log is as follow:
2017-09-14 15:20:50.525097: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties:
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.7335
pciBusID 0000:03:00.0
Total memory: 7.92GiB
Free memory: 7.81GiB
2017-09-14 15:20:50.525430: W tensorflow/stream_executor/cuda/cuda_driver.cc:485] creating context when one is currently active; existing: 0x888b850
2017-09-14 15:20:50.797637: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 1 with properties:
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.7335
pciBusID 0000:04:00.0
Total memory: 7.92GiB
Free memory: 7.81GiB
2017-09-14 15:20:50.798905: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 1
2017-09-14 15:20:50.798925: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0: Y Y
2017-09-14 15:20:50.798932: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 1: Y Y
2017-09-14 15:20:50.798944: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:03:00.0)
2017-09-14 15:20:50.798953: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX 1080, pci bus id: 0000:04:00.0)
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-6:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-8:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-9:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-10:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-11:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-12:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-13:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-14:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-15:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Exception in thread Thread-16:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 158, in <module>
app.really_start(_main)
File "/usr/local/lib/python2.7/dist-packages/google/apputils/app.py", line 220, in really_start
sys.exit(main(argv))
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 148, in _main
run_thread(agents[-1], FLAGS.map, FLAGS.render)
File "/opt/share1/Project/Generic/RL/pysc2-agents/main.py", line 79, in run_thread
visualize=visualize) as env:
File "/usr/local/lib/python2.7/dist-packages/pysc2/env/sc2_env.py", line 128, in __init__
raise ValueError("All arguments must be passed as keyword arguments.")
ValueError: All arguments must be passed as keyword arguments.
/usr/lib/python2.7
This repository most likely requires Python 3.0+. Training works for me on Python 3.6.1.
In main.py, line 72, modify "map_name," to be "map_name=map_name,"
I think yukang2017 is right. Details can be found here google-deepmind/pysc2@cad5a01
Thanks @yukang2017 , problem solved!
The latest commit a1c7956 by @XHUJOY fixed this.
P.S.: python2.7 is compatible with all dependencies required by this project. @inoryy
Closed this issue.