From 57ccd4c389017dd1673dac205dd52e4cf11f7db0 Mon Sep 17 00:00:00 2001 From: Lars Przybylek Date: Thu, 28 Aug 2025 17:47:00 +0200 Subject: [PATCH 1/2] fix: Remove trial_id check when loading Optuna study If no trail id ist given to load _trail() it, will load the best trail. When checking `trai_id != None` this disables this feature and makes it unusabel. --- rl_zoo3/exp_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rl_zoo3/exp_manager.py b/rl_zoo3/exp_manager.py index b004626f9..d226f8fe8 100644 --- a/rl_zoo3/exp_manager.py +++ b/rl_zoo3/exp_manager.py @@ -344,7 +344,7 @@ def read_hyperparameters(self) -> tuple[dict[str, Any], dict[str, Any]]: else: raise ValueError(f"Hyperparameters not found for {self.algo}-{self.env_name.gym_id} in {self.config}") - if self.storage and self.study_name and self.trial_id: + if self.storage and self.study_name: print("Loading from Optuna study...") study_hyperparams = self.load_trial(self.storage, self.study_name, self.trial_id) hyperparams.update(study_hyperparams) From 390e25ab821615a7410bc8626c1b84f22728d961 Mon Sep 17 00:00:00 2001 From: Lars Przybylek Date: Thu, 28 Aug 2025 18:32:31 +0200 Subject: [PATCH 2/2] chore: add changelog entry --- docs/misc/changelog.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index cf5d4b9e1..111b4447f 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -5,3 +5,11 @@ Changelog See https://github.com/DLR-RM/rl-baselines3-zoo/blob/master/CHANGELOG.md + +Bug Fixes: +^^^^^^^^^^ +- Remove trial_id check when loading Optuna study (@rclarsfull) + +Contributors: +------------- +- @rclarsfull \ No newline at end of file