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:
committed by
zach dwiel
parent
ad7f031031
commit
c2991819b4
@@ -9,7 +9,7 @@ from rl_coach.memories.memory import MemoryGranularity
|
||||
from rl_coach.schedules import LinearSchedule
|
||||
|
||||
|
||||
def construct_graph(redis_ip='localhost', redis_port=6379):
|
||||
|
||||
####################
|
||||
# Graph Scheduling #
|
||||
####################
|
||||
@@ -40,10 +40,6 @@ def construct_graph(redis_ip='localhost', redis_port=6379):
|
||||
# E-Greedy schedule
|
||||
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 #
|
||||
################
|
||||
@@ -65,7 +61,3 @@ def construct_graph(redis_ip='localhost', redis_port=6379):
|
||||
graph_manager = BasicRLGraphManager(agent_params=agent_params, env_params=env_params,
|
||||
schedule_params=schedule_params, vis_params=vis_params,
|
||||
preset_validation_params=preset_validation_params)
|
||||
return graph_manager
|
||||
|
||||
|
||||
graph_manager = construct_graph()
|
||||
|
||||
@@ -40,6 +40,9 @@ def main():
|
||||
|
||||
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(
|
||||
graph_manager=graph_manager,
|
||||
checkpoint_dir=args.checkpoint_dir,
|
||||
|
||||
Reference in New Issue
Block a user