Utils#
navground.learning.utils
Plotting#
navground.learning.utils.plot
Bases:
NamedTuple
StableBaseLine3#
navground.learning.utils.sb3
Bases:
BaseCallbackSimilar to SB3’s own
stable_baselines3.common.callbacks.ProgressBarCallback, it displays a progress bar when training SB3 agent using tqdm but includes episodes mean reward and length.- Parameters:
every (int)
Bases:
BaseCallbackA SB3 callback that makes a video of one or more runs of an environment.
- Parameters:
env (BaseEnv | BaseParallelEnv | VecEnv)
save_path (PathLike | None)
number (int)
grouped (bool)
pre (ObservationTransform | None)
group_pre (GroupObservationsTransform | None)
video_format (str)
policy (Any)
kwargs (Any)
Loads the evaluation logs from a csv.
Plots reward, success and/or length from the eval logs
- Parameters:
path (PathLike) – The directory with csv logs
reward (bool) – Whether to plot the reward
reward_color (str) – The reward color
reward_linestyle (str) – The reward linestyle
success (bool) – Whether to plot the success
length (bool) – Whether to plot the length
reward_low (float | None) – An optional lower bound to scale the reward
reward_high (float) – An optional upper bound to scale the reward
lenght_low – An optional lower bound to scale the reward
lenght_high – An optional upper bound to scale the reward
two_axis (bool) – Whether to use two axis (only if there are two fields)
length_low (float)
length_high (float | None)
kwargs (Any)
- Return type:
None
BenchMARL#
navground.learning.utils.benchmarl