malib.rollout.inference.ray package


malib.rollout.inference.ray.client module

malib.rollout.inference.ray.server module

class malib.rollout.inference.ray.server.ClientHandler(sender, recver, runtime_config, rnn_states)

Bases: tuple

Create new instance of ClientHandler(sender, recver, runtime_config, rnn_states)

property recver

Alias for field number 1

property rnn_states

Alias for field number 3

property runtime_config

Alias for field number 2

property sender

Alias for field number 0

class malib.rollout.inference.ray.server.RayInferenceWorkerSet(agent_id: str, observation_space: Space, action_space: Space, parameter_server: ParameterServer, governed_agents: List[str])[source]

Bases: RemoteInterface

Create ray-based inference server.

  • agent_id (AgentID) – Runtime agent id, not environment agent id.

  • observation_space (gym.Space) – Observation space related to the governed environment agents.

  • action_space (gym.Space) – Action space related to the governed environment agents.

  • parameter_server (ParameterServer) – Parameter server.

  • governed_agents (List[AgentID]) – A list of environment agents.

compute_action(dataframes: List[DataFrame], runtime_config: Dict[str, Any]) List[DataFrame][source]
save(model_dir: str) None[source]