#2628 - ran the primaite v3 benchmarking script
This commit is contained in:
@@ -33,7 +33,10 @@ class BenchmarkSession:
|
|||||||
num_episodes: int
|
num_episodes: int
|
||||||
"""Number of episodes to run the training session."""
|
"""Number of episodes to run the training session."""
|
||||||
|
|
||||||
num_steps: int
|
episode_len: int
|
||||||
|
"""The number of steps per episode."""
|
||||||
|
|
||||||
|
total_steps: int
|
||||||
"""Number of steps to run the training session."""
|
"""Number of steps to run the training session."""
|
||||||
|
|
||||||
batch_size: int
|
batch_size: int
|
||||||
@@ -52,12 +55,20 @@ class BenchmarkSession:
|
|||||||
"""Dict containing the metadata for the session - used to generate benchmark report."""
|
"""Dict containing the metadata for the session - used to generate benchmark report."""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, gym_env: BenchmarkPrimaiteGymEnv, num_episodes: int, num_steps: int, batch_size: int, learning_rate: float
|
self,
|
||||||
|
gym_env: BenchmarkPrimaiteGymEnv,
|
||||||
|
episode_len: int,
|
||||||
|
num_episodes: int,
|
||||||
|
n_steps: int,
|
||||||
|
batch_size: int,
|
||||||
|
learning_rate: float,
|
||||||
):
|
):
|
||||||
"""Initialise the BenchmarkSession."""
|
"""Initialise the BenchmarkSession."""
|
||||||
self.gym_env = gym_env
|
self.gym_env = gym_env
|
||||||
|
self.episode_len = episode_len
|
||||||
|
self.n_steps = n_steps
|
||||||
self.num_episodes = num_episodes
|
self.num_episodes = num_episodes
|
||||||
self.num_steps = num_steps
|
self.total_steps = self.num_episodes * self.episode_len
|
||||||
self.batch_size = batch_size
|
self.batch_size = batch_size
|
||||||
self.learning_rate = learning_rate
|
self.learning_rate = learning_rate
|
||||||
|
|
||||||
@@ -65,12 +76,16 @@ class BenchmarkSession:
|
|||||||
"""Run the training session."""
|
"""Run the training session."""
|
||||||
# start timer for session
|
# start timer for session
|
||||||
self.start_time = datetime.now()
|
self.start_time = datetime.now()
|
||||||
# TODO check these parameters are correct
|
model = PPO(
|
||||||
# EPISODE_LEN = 10
|
policy="MlpPolicy",
|
||||||
TOTAL_TIMESTEPS = 131072
|
env=self.gym_env,
|
||||||
LEARNING_RATE = 3e-4
|
learning_rate=self.learning_rate,
|
||||||
model = PPO("MlpPolicy", self.gym_env, learning_rate=LEARNING_RATE, verbose=0, tensorboard_log="./PPO_UC2/")
|
n_steps=self.n_steps,
|
||||||
model.learn(total_timesteps=TOTAL_TIMESTEPS)
|
batch_size=self.batch_size,
|
||||||
|
verbose=0,
|
||||||
|
tensorboard_log="./PPO_UC2/",
|
||||||
|
)
|
||||||
|
model.learn(total_timesteps=self.total_steps)
|
||||||
|
|
||||||
# end timer for session
|
# end timer for session
|
||||||
self.end_time = datetime.now()
|
self.end_time = datetime.now()
|
||||||
@@ -140,11 +155,12 @@ def _prepare_session_directory():
|
|||||||
|
|
||||||
def run(
|
def run(
|
||||||
number_of_sessions: int = 5,
|
number_of_sessions: int = 5,
|
||||||
num_episodes: int = 512,
|
num_episodes: int = 1000,
|
||||||
num_timesteps: int = 128,
|
episode_len: int = 128,
|
||||||
batch_size: int = 128,
|
n_steps: int = 1280,
|
||||||
|
batch_size: int = 32,
|
||||||
learning_rate: float = 3e-4,
|
learning_rate: float = 3e-4,
|
||||||
) -> None: # 10 # 1000 # 256
|
) -> None:
|
||||||
"""Run the PrimAITE benchmark."""
|
"""Run the PrimAITE benchmark."""
|
||||||
benchmark_start_time = datetime.now()
|
benchmark_start_time = datetime.now()
|
||||||
|
|
||||||
@@ -160,7 +176,8 @@ def run(
|
|||||||
session = BenchmarkSession(
|
session = BenchmarkSession(
|
||||||
gym_env=gym_env,
|
gym_env=gym_env,
|
||||||
num_episodes=num_episodes,
|
num_episodes=num_episodes,
|
||||||
num_steps=num_timesteps,
|
n_steps=n_steps,
|
||||||
|
episode_len=episode_len,
|
||||||
batch_size=batch_size,
|
batch_size=batch_size,
|
||||||
learning_rate=learning_rate,
|
learning_rate=learning_rate,
|
||||||
)
|
)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
BIN
benchmark/results/v3.0.0/PrimAITE v3.0.0 Learning Benchmark.pdf
Normal file
BIN
benchmark/results/v3.0.0/PrimAITE v3.0.0 Learning Benchmark.pdf
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 411 KiB After Width: | Height: | Size: 296 KiB |
@@ -1,122 +0,0 @@
|
|||||||
\documentclass{article}%
|
|
||||||
\usepackage[T1]{fontenc}%
|
|
||||||
\usepackage[utf8]{inputenc}%
|
|
||||||
\usepackage{lmodern}%
|
|
||||||
\usepackage{textcomp}%
|
|
||||||
\usepackage{lastpage}%
|
|
||||||
\usepackage{geometry}%
|
|
||||||
\geometry{tmargin=2.5cm,rmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm}%
|
|
||||||
\usepackage{graphicx}%
|
|
||||||
%
|
|
||||||
\title{PrimAITE 3.0.0 Learning Benchmark}%
|
|
||||||
\author{PrimAITE Dev Team}%
|
|
||||||
\date{2024{-}06{-}01}%
|
|
||||||
%
|
|
||||||
\begin{document}%
|
|
||||||
\normalsize%
|
|
||||||
\maketitle%
|
|
||||||
\section{Introduction}%
|
|
||||||
\label{sec:Introduction}%
|
|
||||||
PrimAITE v3.0.0 was benchmarked automatically upon release. Learning rate metrics were captured to be referenced during system{-}level testing and user acceptance testing (UAT).%
|
|
||||||
\newline%
|
|
||||||
The benchmarking process consists of running 10 training session using the same config file. Each session trains an agent for 1000 episodes, with each episode consisting of 128 steps.%
|
|
||||||
\newline%
|
|
||||||
The mean reward per episode from each session is captured. This is then used to calculate a combined average reward per episode from the 10 individual sessions for smoothing. Finally, a 25{-}widow rolling average of the combined average reward per session is calculated for further smoothing.
|
|
||||||
|
|
||||||
%
|
|
||||||
\section{System Information}%
|
|
||||||
\label{sec:SystemInformation}%
|
|
||||||
\subsection{Python}%
|
|
||||||
\label{subsec:Python}%
|
|
||||||
\begin{tabular}{|l|l|}%
|
|
||||||
\hline%
|
|
||||||
\textbf{Version}&3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) {[}MSC v.1928 64 bit (AMD64){]}\\%
|
|
||||||
\hline%
|
|
||||||
\end{tabular}
|
|
||||||
|
|
||||||
%
|
|
||||||
\subsection{System}%
|
|
||||||
\label{subsec:System}%
|
|
||||||
\begin{tabular}{|l|l|}%
|
|
||||||
\hline%
|
|
||||||
\textbf{OS}&Windows\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{OS Version}&10.0.19045\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Machine}&AMD64\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Processor}&Intel64 Family 6 Model 85 Stepping 4, GenuineIntel\\%
|
|
||||||
\hline%
|
|
||||||
\end{tabular}
|
|
||||||
|
|
||||||
%
|
|
||||||
\subsection{CPU}%
|
|
||||||
\label{subsec:CPU}%
|
|
||||||
\begin{tabular}{|l|l|}%
|
|
||||||
\hline%
|
|
||||||
\textbf{Physical Cores}&6\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Total Cores}&12\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Max Frequency}&3600.00Mhz\\%
|
|
||||||
\hline%
|
|
||||||
\end{tabular}
|
|
||||||
|
|
||||||
%
|
|
||||||
\subsection{Memory}%
|
|
||||||
\label{subsec:Memory}%
|
|
||||||
\begin{tabular}{|l|l|}%
|
|
||||||
\hline%
|
|
||||||
\textbf{Total}&63.52GB\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Swap Total}&9.50GB\\%
|
|
||||||
\hline%
|
|
||||||
\end{tabular}
|
|
||||||
|
|
||||||
%
|
|
||||||
\section{Stats}%
|
|
||||||
\label{sec:Stats}%
|
|
||||||
\subsection{Benchmark Results}%
|
|
||||||
\label{subsec:BenchmarkResults}%
|
|
||||||
\begin{tabular}{|l|l|}%
|
|
||||||
\hline%
|
|
||||||
\textbf{Total Sessions}&10\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Total Episodes}&10010\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Total Steps}&1280000\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Av Session Duration (s)}&1569.8775\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Av Step Duration (s)}&0.0012\\%
|
|
||||||
\hline%
|
|
||||||
\textbf{Av Duration per 100 Steps per 10 Nodes (s)}&0.1226\\%
|
|
||||||
\hline%
|
|
||||||
\end{tabular}
|
|
||||||
|
|
||||||
%
|
|
||||||
\section{Graphs}%
|
|
||||||
\label{sec:Graphs}%
|
|
||||||
\subsection{PrimAITE 3.0.0 Learning Benchmark Plot}%
|
|
||||||
\label{subsec:PrimAITE3.0.0LearningBenchmarkPlot}%
|
|
||||||
|
|
||||||
|
|
||||||
\begin{figure}[h!]%
|
|
||||||
\centering%
|
|
||||||
\includegraphics[width=0.8\textwidth]{D:/Projects/ARCD/PrimAITE/PrimAITE/benchmark/results/v3.0.0/PrimAITE v3.0.0 Learning Benchmark.png}%
|
|
||||||
\caption{PrimAITE 3.0.0 Learning Benchmark Plot}%
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
%
|
|
||||||
\subsection{PrimAITE All Versions Learning Benchmark Plot}%
|
|
||||||
\label{subsec:PrimAITEAllVersionsLearningBenchmarkPlot}%
|
|
||||||
|
|
||||||
|
|
||||||
\begin{figure}[h!]%
|
|
||||||
\centering%
|
|
||||||
\includegraphics[width=0.8\textwidth]{D:/Projects/ARCD/PrimAITE/PrimAITE/benchmark/results/PrimAITE Versions Learning Benchmark.png}%
|
|
||||||
\caption{PrimAITE All Versions Learning Benchmark Plot}%
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
%
|
|
||||||
\end{document}
|
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user