network_gym_client#

network_gym_client

action

obs,rewards

env_config,policy

network_stats

agent

gymnasium.env

adapter

northbound Interface

NetworkGym Client includes the three components, a custom gymnasium.env, adapter and northbound interface.

  • The custom gymnasium.env inherets the environment class of gymnasium and communicates with the agent using the standard gymnasium interfaces. E.g., exchange obs, reward and action in the reset() and step() functions.

import gymnasium as gym
class Env(gym.Env):
    """Custom Environment that follows gym interface."""

    def __init__(self, arg1, arg2, ...):
        super().__init__()
        ...

    def step(self, action):
        ...
        return observation, reward, terminated, truncated, info

    def reset(self, seed=None, options=None):
        ...
        return observation, info
  • The adapter transform the data format from gymnasium to network_gym or the other way around. E.g., it transforms network stats to obs and reward, and changes action to policy.

  • The northbound interface connects the client to the server, configure the environment parameters, communicate network stats and policy between client and network_gym envrionment.