python train_dqfd.py
Traceback (most recent call last):
File "train_dqfd.py", line 28, in <module>
from chainerrl import experiments, explorers
ImportError: cannot import name 'experiments' from 'chainerrl' (unknown location)
是弄docker呢还是看论文呢
乱七八糟,山穷水尽了
- 要求
一套竞争和非竞争基线提供矿。你需要写一个关于算法的简要总结,以及你选择的每个基线的比赛结果(奖励)。
至少两个基线具体所指是什么?所有的基线在哪儿。
-
这个专家数据集在哪里下载?
Getting started
Dataset download
In order to run the Behavoral Cloning, GAIL and DQfD agents, you need to download expert dataset into an appropriate location (by default, baselines/expert_dataset). -
[baselines/dddqn.sh] 又如何训练?
Training
[baselines/dddqn.sh]
Double Dueling DQN (DDDQN), with implementation and hyperparameters as described in the proposal paper (code: here and here).
[baselines/rainbow.sh]
Rainbow
[baselines/ppo.sh]
PPO
[baselines/behavoral_cloning.sh]
Behavoral Cloning (BC)
[baselines/gail.sh]
GAIL
[baselines/dqfd.sh]
DQfD -
chanerrl算集中的一个基线模型
competition/ # Baseline submissions for NeurIPS comp (MineRLObtainDiamond-v0)
random_agent/ # git submodule, forks minerllabs/aicrowd_submission_template
dqn_baseline/ # git submodule, forks ^^
[…]
general/ # General baselines for the 6+ minerl environments!
chainerrl/ # Baselines written in the Chainer RL framework
[…]
- 下载数据失败
(base) [ec2-user@ip- workspace]$ python
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import minerl
import gym
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘gym’cd minerl
File “”, line 1
cd minerl
^
SyntaxError: invalid syntaxexit()
(base) [ec2-user@ip- workspace]$ cd minerl
(base) [ec2-user@ip- minerl]$ sudo python setup.py install
Traceback (most recent call last):
File “setup.py”, line 5, in
import pathlib
ImportError: No module named pathlib
(base) [ec2-user@ip- minerl]$ git clone git@github.com:mcmtroffaes/pathlib2.git
Cloning into ‘pathlib2’…
remote: Enumerating objects: 1473, done.
remote: Total 1473 (delta 0), reused 0 (delta 0), pack-reused 1473
Receiving objects: 100% (1473/1473), 2.30 MiB | 24.48 MiB/s, done.
Resolving deltas: 100% (884/884), done.
(base) [ec2-user@ip- minerl]$ cd sudo python setup.py install
bash: cd: sudo: No such file or directory
(base) [ec2-user@ip- minerl]$ cd pathlin2
bash: cd: pathlin2: No such file or directory
(base) [ec2-user@ip- minerl]$ cd pathlib2
(base) [ec2-user@ip- pathlib2]$ sudo python setup.py install
running install
running bdist_egg
running egg_info
creating pathlib2.egg-info
writing requirements to pathlib2.egg-info/requires.txt
writing pathlib2.egg-info/PKG-INFO
writing top-level names to pathlib2.egg-info/top_level.txt
writing dependency_links to pathlib2.egg-info/dependency_links.txt
writing manifest file ‘pathlib2.egg-info/SOURCES.txt’
reading manifest file ‘pathlib2.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no previously-included files found matching ‘.travis.yml’
warning: no previously-included files found matching ‘appveyor.yml’
warning: no previously-included files found matching ‘codecov.yml’
no previously-included directories found matching ‘appveyor’
writing manifest file ‘pathlib2.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/pathlib2
copying pathlib2/init.py -> build/lib/pathlib2
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/pathlib2
copying build/lib/pathlib2/init.py -> build/bdist.linux-x86_64/egg/pathlib2
byte-compiling build/bdist.linux-x86_64/egg/pathlib2/init.py to init.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying pathlib2.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pathlib2.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pathlib2.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pathlib2.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pathlib2.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents…
creating dist
creating ‘dist/pathlib2-2.3.6a0-py2.7.egg’ and adding ‘build/bdist.linux-x86_64/egg’ to it
removing ‘build/bdist.linux-x86_64/egg’ (and everything under it)
Processing pathlib2-2.3.6a0-py2.7.egg
Removing /usr/local/lib/python2.7/site-packages/pathlib2-2.3.6a0-py2.7.egg
Copying pathlib2-2.3.6a0-py2.7.egg to /usr/local/lib/python2.7/site-packages
pathlib2 2.3.6a0 is already the active version in easy-install.pth
Installed /usr/local/lib/python2.7/site-packages/pathlib2-2.3.6a0-py2.7.egg
Processing dependencies for pathlib22.3.6a0
Searching for scandir1.10.0
Best match: scandir 1.10.0
Adding scandir 1.10.0 to easy-install.pth file
Using /usr/lib64/python2.7/dist-packages
Searching for six==1.10.0
Best match: six 1.10.0
Adding six 1.10.0 to easy-install.pth file
Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for pathlib2==2.3.6a0
(base) [ec2-user@ip- pathlib2]$ cd …
(base) [ec2-user@ip- minerl]$ sudo python setup.py install
Traceback (most recent call last):
File “setup.py”, line 5, in
import pathlib
ImportError: No module named pathlib
(base) [ec2-user@ip- minerl]$
import minerl
import gym
env = gym.make('MineRLNavigateDense-v0')
obs = env.reset()
done = False
while not done:
action = env.action_space.sample()
# One can also take a no_op action with
# action =env.action_space.noop()
obs, reward, done, info = env.step(
action)
结果:
opt/anaconda3/lib/python3.7/site-packages/gym-0.17.2-py3.7.egg/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
Failed to reset (socket error), trying again!
Cleaning connection! Something must have gone wrong.
Failed to reset (socket error), trying again!
Cleaning connection! Something must have gone wrong.
Connection with Minecraft client cleaned more than once; restarting.
Attempted to send kill command to minecraft process and failed.
Failed to reset (socket error), trying again!
Cleaning connection! Something must have gone wrong.
Failed to reset (socket error), trying again!
Cleaning connection! Something must have gone wrong.
Connection with Minecraft client cleaned more than once; restarting.
Attempted to send kill command to minecraft process and failed.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-68980fa6ca4b> in <module>
15
16 obs, reward, done, info = env.step(
---> 17 action)
~/opt/anaconda3/lib/python3.7/site-packages/gym-0.17.2-py3.7.egg/gym/wrappers/time_limit.py in step(self, action)
14 def step(self, action):
15 assert self._elapsed_steps is not None, "Cannot call env.step() before calling reset()"
---> 16 observation, reward, done, info = self.env.step(action)
17 self._elapsed_steps += 1
18 if self._elapsed_steps >= self._max_episode_steps:
~/opt/anaconda3/lib/python3.7/site-packages/minerl/env/core.py in step(self, action)
625 # Receive reward done and sent.
626 reply = comms.recv_message(self.client_socket)
--> 627 reward, done, sent = struct.unpack('!dbb', reply)
628
629 # Receive info from the environment.
TypeError: a bytes-like object is required, not 'NoneType'
import minerl
# YOU ONLY NEED TO DO THIS ONCE!
minerl.data.download('/Users/ivyone/minerl')
data = minerl.data.make(
'MineRLObtainDiamond-v0',
data_dir='/Users/ivyone/minerl')
# Iterate through a single epoch gathering sequences of at most 32 steps
for current_state, action, reward, next_state, done \
in data.sarsd_iter(
num_epochs=1, max_sequence_len=32):
# Print the POV @ the first step of the sequence
print(current_state['pov'][0])
# Print the final reward pf the sequence!
print(reward[-1])
# Check if final (next_state) is terminal.
print(done[-1])
# ... do something with the data.
print("At the end of trajectories the length"
"can be < max_sequence_len", len(reward))
As of MineRL 0.3.0 automatic hash checking has been disabled.
Download: https://minerl-asia.s3.amazonaws.com/v3/data_texture_0_low_res.tar: 0%| | 0/65075.77344 [00:00<?, ?MB/s]ERROR:root:Error - HTTPSConnectionPool(host='minerl-asia.s3.amazonaws.com', port=443): Read timed out.
ERROR:root:Header from download attempt of https://minerl-asia.s3.amazonaws.com/v3/data_texture_0_low_res.tar: {'x-amz-id-2': 'P6oRwN/t7htn8LpM/dE+Ti591MOS/xDMd8JVA5KIabKlaS2fgS19kca/mGG31gqWOIey4sbbeMM=', 'x-amz-request-id': '9F64C1C365AE085E', 'Date': 'Fri, 07 Aug 2020 08:30:50 GMT', 'x-amz-replication-status': 'COMPLETED', 'Last-Modified': 'Tue, 16 Jun 2020 19:42:53 GMT', 'ETag': '"f9fae52c2092e484e02c0f31044be4db-3879"', 'x-amz-version-id': 'ElQkZTZ_NxyhsN1Y_OIFpbjqu_4FcnY8', 'Accept-Ranges': 'bytes', 'Content-Type': 'application/x-tar', 'Content-Length': '65075773440', 'Server': 'AmazonS3'}
ERROR:minerl.data.download:IO error encountered when downloading - please try again
ERROR:minerl.data.download:None
---------------------------------------------------------------------------
DeprecationWarning Traceback (most recent call last)
<ipython-input-2-855f41135885> in <module>
11 for current_state, action, reward, next_state, done \
12 in data.sarsd_iter(
---> 13 num_epochs=1, max_sequence_len=32):
14
15 # Print the POV @ the first step of the sequence
~/opt/anaconda3/lib/python3.7/site-packages/minerl/data/data_pipeline.py in sarsd_iter(self, num_epochs, max_sequence_len, queue_size, seed, include_metadata)
483 """
484 raise DeprecationWarning(
--> 485 "The `DataPipeline.sarsd_iter` method is deprecated! Please use DataPipeline.batch_iter().")
486
487
DeprecationWarning: The `DataPipeline.sarsd_iter` method is deprecated! Please use DataPipeline.batch_iter().
8. 准备搞docker了
docker下不了啊
10. 60个G的在这儿。
https://blog.csdn.net/weixin_40945354/article/details/107771372
~~~~~~~~~~~~~~~~~~~~~~
1. docker 下报错,是因为没有全部上传到这里吗?有那么麻烦?
root@de78e:/tf# xvfb-run python dqfd.py
Traceback (most recent call last):
File "dqfd.py", line 28, in <module>
from chainerrl.replay_buffer import PrioritizedBuffer, PrioritizedReplayBuffer
ImportError: cannot import name 'PrioritizedBuffer'
root@de78ee3a8968:/tf#
2. No module named 'agents'
3. root@de78e:/tf# xvfb-run python gail.py
/usr/local/lib/python3.6/dist-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
Traceback (most recent call last):
File "gail.py", line 22, in <module>
from agents.behavioral_cloning import BehavioralCloning
ModuleNotFoundError: No module named 'agents'
3. 什么叫这是已经配置完成的环境,可以直接在里面运行 https://github.com/minerllabs/baselines 等代码
在尝试运行train_dqfd.py时遇到导入错误,无法从chainerrl导入'experiments'。同时,在安装和配置Minerl及相关库如gym时,出现了模块找不到的错误,例如gym和pathlib。通过克隆并安装pathlib2解决了部分问题,但继续运行setup.py仍然报错。
244

被折叠的 条评论
为什么被折叠?



