sinergym.utils.wrappers.LoggerWrapper

class sinergym.utils.wrappers.LoggerWrapper(*args: Any, **kwargs: Any)
__init__(env, flag=True)

CSVLogger to log interactions with environment.

Parameters:
  • env (object) – Original Gym environment.

  • flag (bool, optional) – State of logger (activate or deactivate).

Methods

__init__(env[, flag])

CSVLogger to log interactions with environment.

activate_logger()

Activate logger if its flag False.

close()

Close env.

deactivate_logger()

Deactivate logger if its flag True.

reset()

Resets the environment.

step(action)

Step the environment.

activate_logger()

Activate logger if its flag False.

close()

Close env. Recording last episode summary.

deactivate_logger()

Deactivate logger if its flag True.

reset()

Resets the environment. Recording episode summary in logger

step(action)

Step the environment. Logging new information

Parameters:

action – Action executed in step

Returns:

(np.array(),float,bool,dict) tuple