-
Notifications
You must be signed in to change notification settings - Fork 0
qlearning on tensorflow. 0.84 success rate #5
base: nlu-train
Are you sure you want to change the base?
Conversation
я бы убрал из коммита бинарные модели |
src/draw_learning_curve.py
Outdated
@@ -14,11 +14,15 @@ | |||
def read_performance_records(path): | |||
""" load the performance score (.json) file """ | |||
|
|||
data = json.load(open(path, 'rb')) | |||
data = json.load(open(path, 'r')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'rb' лучше
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rb только для бинарных данных. Читать json файлы с такой опцией нельзя
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тогда 'rt'; explicit better than implicit
src/deep_dialog/qlearning/dqn.py
Outdated
self.epsilon_max = kwargs.get('e_greedy', 0.9) | ||
self.batch_size = kwargs.get('batch_size', 16) | ||
self.epsilon_increment = kwargs.get('e_greedy_increment') | ||
#self.epsilon = 0 if kwargs.get('e_greedy_increment', False) else self.epsilon_max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убрать комментированную строку
src/telegram_bot/bot.py
Outdated
else: | ||
bot.delete_webhook() | ||
bot.polling(none_stop=True) ## uncomment it for local testing; | ||
# @bot.message_handler(commands=['help']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
либо убрать, либо раскомментировать
src/telegram_bot/bot.py
Outdated
msg = input() | ||
episode_over, agent_ans = dia_manager.next_turn(msg) | ||
turn_count+=1 | ||
# bot.send_message(msg, agent_ans+' ' + get_random_emoji(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убрать или раскомментировать
src/telegram_bot/bot.py
Outdated
@@ -84,7 +84,6 @@ def get_random_emoji(num = 1): | |||
msg = input() | |||
episode_over, agent_ans = dia_manager.next_turn(msg) | |||
turn_count+=1 | |||
# bot.send_message(msg, agent_ans+' ' + get_random_emoji(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а почему здесь был отсыл сообщения ботом, а теперь нет?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я не знаю. В твоём замечании по этому куску было написано "убрать или раскомментировать"
я и убрал
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я буду выражаться яснее в следующий раз, имелось в виду следующее: не должно быть закомментированного кода, либо он раскомментирован, либо его нет
у тебя этот кусок кода был закомментирован, я указал, что это неправильно; правильно - понять, что там должно быть и - например, раскомментированная строка, или какая-то другая строка; кажется, что функционал в этом месте изменился после убирания этого кода, что нехорошо
Лучшая модель - agt_9_0.84.tf-0. Если запускать через run.py - нужно указать параметр
--trained_model_path ./deep_dialog/checkpoints/rl_agent/agt_9_0.79.tf-0. Загрузить DoubleDQN можно через статический метод load с моделью, указанной выше