class comet_ml.integration.gymnasium.CometLogger(self, env: gym.Env, experiment: comet_ml.Experiment)
Gymnasium Wrapper that logs the step length and cumulative reward for an episode to Comet
- env: gymnasium.Env (required), gymnasium environment to wrap
- experiment: Experiment (required), the Comet Experiment object to use for experiment management
Resets length and reward counters and increments episode counter. Any arguments specified in
kwargs are passed to Gymnasium enviroment as usual.
Steps through the environment using given action. Episode reward, length and step counter are tracked.
'ActType'(required), an action provided by the agent to update the environment state.
Returns the number of episodes that have passed. Incremented when
.reset() is called
Returns the number of times
.step() has been called
Cleans up the environment after the user has finished using it.
If the original environment wrapped by this object was also wrapped by a
RecordVideo wrapper, this method will log the video files to Comet.
Mar. 21, 2023