From d12087f0ba42d01950ac1ea9bbafc5edc5f62874 Mon Sep 17 00:00:00 2001 From: Roddie Hasan Date: Tue, 7 Jan 2025 00:24:17 -0600 Subject: [PATCH] Add checkpoint save after timestep limit reached --- RLGymPPO_CPP/src/public/RLGymPPO_CPP/Learner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RLGymPPO_CPP/src/public/RLGymPPO_CPP/Learner.cpp b/RLGymPPO_CPP/src/public/RLGymPPO_CPP/Learner.cpp index 923de67..8b23553 100644 --- a/RLGymPPO_CPP/src/public/RLGymPPO_CPP/Learner.cpp +++ b/RLGymPPO_CPP/src/public/RLGymPPO_CPP/Learner.cpp @@ -604,6 +604,7 @@ void RLGPC::Learner::Learn() { RG_LOG("Learner: Timestep limit of " << config.timestepLimit << " reached, stopping"); RG_LOG("\tStopping agents..."); agentMgr->StopAgents(); + Save(); // Save checkpoint after target timestep limit } void RLGPC::Learner::AddNewExperience(GameTrajectory& gameTraj, Report& report) { @@ -742,4 +743,4 @@ RLGPC::Learner::~Learner() { delete metricSender; delete renderSender; pybind11::finalize_interpreter(); -} \ No newline at end of file +}