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

tensorflow.python.framework.errors_impl.NotFoundError: data/battle_model/trusty-battle-game-l; No such file or directory #21

Open
bkzfyx opened this issue Jan 13, 2021 · 4 comments

Comments

@bkzfyx
Copy link

bkzfyx commented Jan 13, 2021

When I run the multi_battle.py, the following error happened:
Traceback (most recent call last):
File "examples/multi_battle.py", line 215, in
tf_model.load("data/battle_model", 0, 'trusty-battle-game-l')
File "/home/bkz/Downloads/MAgent-master/python/magent/builtin/tf_model/base.py", line 55, in load
saver.restore(self.sess, os.path.join(dir_name, (self.subclass_name + "_%d") % epoch))
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/training/saver.py", line 1276, in restore
if not checkpoint_management.checkpoint_exists(compat.as_text(save_path)):
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/training/checkpoint_management.py", line 372, in checkpoint_exists
if file_io.get_matching_files(pathname):
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 363, in get_matching_files
return get_matching_files_v2(filename)
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 384, in get_matching_files_v2
compat.as_bytes(pattern))
tensorflow.python.framework.errors_impl.NotFoundError: data/battle_model/trusty-battle-game-l; No such file or directory

Could you please tell me how to solve the problem or the reason of the problem? Thank you very much!

@Ppaddington
Copy link

When I run the multi_battle.py, the following error happened:
Traceback (most recent call last):
File "examples/multi_battle.py", line 215, in
tf_model.load("data/battle_model", 0, 'trusty-battle-game-l')
File "/home/bkz/Downloads/MAgent-master/python/magent/builtin/tf_model/base.py", line 55, in load
saver.restore(self.sess, os.path.join(dir_name, (self.subclass_name + "_%d") % epoch))
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/training/saver.py", line 1276, in restore
if not checkpoint_management.checkpoint_exists(compat.as_text(save_path)):
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/training/checkpoint_management.py", line 372, in checkpoint_exists
if file_io.get_matching_files(pathname):
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 363, in get_matching_files
return get_matching_files_v2(filename)
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 384, in get_matching_files_v2
compat.as_bytes(pattern))
tensorflow.python.framework.errors_impl.NotFoundError: data/battle_model/trusty-battle-game-l; No such file or directory

Could you please tell me how to solve the problem or the reason of the problem? Thank you very much!

tf_model = DeepQNetwork(env, handles[1], 'trusty-battle-game-l', use_conv=True)
#tf_model.load("data/battle_model", 0, 'trusty-battle-game-l')
Like me, comment out the following line of code.
The author did not give his trained model.

@bkzfyx
Copy link
Author

bkzfyx commented Jan 19, 2021

When I run the multi_battle.py, the following error happened:
Traceback (most recent call last):
File "examples/multi_battle.py", line 215, in
tf_model.load("data/battle_model", 0, 'trusty-battle-game-l')
File "/home/bkz/Downloads/MAgent-master/python/magent/builtin/tf_model/base.py", line 55, in load
saver.restore(self.sess, os.path.join(dir_name, (self.subclass_name + "_%d") % epoch))
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/training/saver.py", line 1276, in restore
if not checkpoint_management.checkpoint_exists(compat.as_text(save_path)):
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/training/checkpoint_management.py", line 372, in checkpoint_exists
if file_io.get_matching_files(pathname):
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 363, in get_matching_files
return get_matching_files_v2(filename)
File "/home/bkz/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 384, in get_matching_files_v2
compat.as_bytes(pattern))
tensorflow.python.framework.errors_impl.NotFoundError: data/battle_model/trusty-battle-game-l; No such file or directory
Could you please tell me how to solve the problem or the reason of the problem? Thank you very much!

tf_model = DeepQNetwork(env, handles[1], 'trusty-battle-game-l', use_conv=True)
#tf_model.load("data/battle_model", 0, 'trusty-battle-game-l')
Like me, comment out the following line of code.
The author did not give his trained model.

Thank you very much, but what is the impact of the line which has been omitted? I don't know clearly the relation between the trained model and the training process of the code.

@george22294
Copy link

Even this answer is late, I think it will be useful for future readers. The DQN pretrained model can be found here: 'https://raw.githubusercontent.com/merrymercy/merrymercy.github.io/master/_data/magent/battle_model.tar.gz

There are two model:
a) trusty-battle-game-l/tfdqn_0.index
b)trusty-battle-game-r/tfdqn_0.index

Based on the code, the right model is (a). I found this link in this script of MAgent platform.

@george22294
Copy link

trusty-battle-game-l.zip

The above link does not work any more. I have attached the model to this comment.

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

3 participants