1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

Adding right arguments to the agent

This commit is contained in:
Ajay Deshpande
2018-09-14 16:17:34 -07:00
committed by zach dwiel
parent ad7f031031
commit c2991819b4
2 changed files with 44 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ from rl_coach.memories.memory import MemoryGranularity
from rl_coach.schedules import LinearSchedule from rl_coach.schedules import LinearSchedule
def construct_graph(redis_ip='localhost', redis_port=6379):
#################### ####################
# Graph Scheduling # # Graph Scheduling #
#################### ####################
@@ -40,10 +40,6 @@ def construct_graph(redis_ip='localhost', redis_port=6379):
# E-Greedy schedule # E-Greedy schedule
agent_params.exploration.epsilon_schedule = LinearSchedule(1.0, 0.01, 10000) agent_params.exploration.epsilon_schedule = LinearSchedule(1.0, 0.01, 10000)
# Redis parameters
agent_params.memory.redis_ip = redis_ip
agent_params.memory.redis_port = redis_port
################ ################
# Environment # # Environment #
################ ################
@@ -65,7 +61,3 @@ def construct_graph(redis_ip='localhost', redis_port=6379):
graph_manager = BasicRLGraphManager(agent_params=agent_params, env_params=env_params, graph_manager = BasicRLGraphManager(agent_params=agent_params, env_params=env_params,
schedule_params=schedule_params, vis_params=vis_params, schedule_params=schedule_params, vis_params=vis_params,
preset_validation_params=preset_validation_params) preset_validation_params=preset_validation_params)
return graph_manager
graph_manager = construct_graph()

View File

@@ -40,6 +40,9 @@ def main():
graph_manager = short_dynamic_import(expand_preset(args.preset), ignore_module_case=True) graph_manager = short_dynamic_import(expand_preset(args.preset), ignore_module_case=True)
graph_manager.agent_parameters.memory.redis_ip = args.redis_ip
graph_manager.agent_params.memory.redis_port = args.redis_port
rollout_worker( rollout_worker(
graph_manager=graph_manager, graph_manager=graph_manager,
checkpoint_dir=args.checkpoint_dir, checkpoint_dir=args.checkpoint_dir,