Cannot load bots trained with self_play_train.py
See original GitHub issueThank you for your efforts in releasing this exciting library. I am trying to train an agent, and then load that agent to view its behaviour rendered in a pygame window. However, the agents that I train are cannot be loaded into a PermissiveModel because they do not have ‘function_tables’ (or signatures for that matter).
I add the following to examples/rllib/self_play_train.py
# 7. Train once
trainer.train()
# Additions
trainer.get_policy("av").export_model("./some_path")
from meltingpot.python import bot
agent = bot.SavedModelPolicy("./some_path")
Running self_play_train.py results in the following error:
Traceback (most recent call last):
File "<repo_path>/meltingpot/examples/rllib/self_play_train.py", line 117, in <module>
main()
File "<repo_path>/meltingpot/examples/rllib/self_play_train.py", line 114, in main
agent = bot.SavedModelPolicy("./some_path")
File "<repo_path>/meltingpot/meltingpot/python/bot.py", line 103, in __init__
self._model = permissive_model.PermissiveModel(model)
File "<repo_path>/meltingpot/meltingpot/python/utils/bots/permissive_model.py", line 51, in __init__
self._tables = self.model.function_tables()
AttributeError: 'AutoTrackable' object has no attribute 'function_tables'
Would it please be possible for you to extend this example to include the saving and loading of bots?
Issue Analytics
- State:
- Created a year ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
The Chatterbot chatbot not performing desirably after training
It is able to answer exactly the statements that it got trained for, simple deviations it is not able to understand. How can...
Read more >Intelligent AI Chatbot in Python - YouTube
Your browser can't play this video. ... Python AI Projects ... Intents (6:48) Load Training Data (13:35) Prepare Training Data (19:40) Build ...
Read more >Chatbots Using Python and Rasa - GeeksforGeeks
Rasa is a tool to build custom AI chatbots using Python and natural ... It also allows the user to train the model...
Read more >hsahovic/poke-env: A python interface for training ... - GitHub
poke-env offers an easy-to-use interface for creating rule-based or training Reinforcement Learning bots to battle on pokemon showdown.
Read more >ChatterBot: Build a Chatbot With Python
You can apply a similar process to train your bot from different ... Attention: While ChatterBot is still a popular open source solution...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@duenez that PR #30 fixed issue #26, not this one. The confusion has come because I removed my first PR and split it into two. PR #30 was the first part, I will submit the second part that addresses this issue next week.
This should be fixed now.