flatland.evaluators.client module

class flatland.evaluators.client.FlatlandRemoteClient(remote_host='127.0.0.1', remote_port=6379, remote_db=0, remote_password=None, test_envs_root=None, verbose=False)[source]

Bases: object

Redis client to interface with flatland-rl remote-evaluation-service The Docker container hosts a redis-server inside the container. This client connects to the same redis-server, and communicates with the service. The service eventually will reside outside the docker container, and will communicate with the client only via the redis-server of the docker container. On the instantiation of the docker container, one service will be instantiated parallely. The service will accepts commands at “service_id::commands” where service_id is either provided as an env variable or is instantiated to “flatland_rl_redis_service_id”

env_create(self, obs_builder_object)[source]

Create a local env and remote env on which the local agent can operate. The observation builder is only used in the local env and the remote env uses a DummyObservationBuilder

env_step(self, action, render=False)[source]

Respond with [observation, reward, done, info]

get_redis_connection(self)[source]
ping_pong(self)[source]

Official Handshake with the evaluation service Send a PING and wait for PONG If not PONG, raise error

submit(self)[source]
update_running_mean_stats(self, key, scalar)[source]

Computes the running mean for certain params