-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[0.6.5.3] stop put exps when testing mode
- Loading branch information
1 parent
836403e
commit ac5dcdc
Showing
3 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ | |
Email: [email protected] | ||
Date: 2023-01-01 16:20:49 | ||
LastEditor: JiangJi | ||
LastEditTime: 2024-06-17 14:44:33 | ||
LastEditTime: 2024-06-18 08:56:38 | ||
Discription: | ||
''' | ||
from joyrl import algos, framework, envs | ||
from joyrl.run import run | ||
|
||
__version__ = "0.6.5.2" | ||
__version__ = "0.6.5.3" | ||
|
||
__all__ = [ | ||
"algos", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
Email: [email protected] | ||
Date: 2023-12-22 23:02:13 | ||
LastEditor: JiangJi | ||
LastEditTime: 2024-06-14 09:34:14 | ||
LastEditTime: 2024-06-18 08:56:04 | ||
Discription: | ||
''' | ||
import time | ||
|
@@ -35,6 +35,8 @@ def _t_start(self): | |
def run(self): | ||
sample_data_len = 0 | ||
while True: | ||
if not (self.cfg.mode.lower() == 'train'): | ||
break | ||
exps = exec_method(self.sample_data_que, 'pop', 'get') | ||
if exps: | ||
sample_data_len += len(exps) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
Email: [email protected] | ||
Date: 2024-02-25 15:46:04 | ||
LastEditor: JiangJi | ||
LastEditTime: 2024-06-14 21:04:30 | ||
LastEditTime: 2024-06-18 08:51:47 | ||
Discription: | ||
''' | ||
import copy | ||
|
@@ -125,7 +125,7 @@ def run(self): | |
exec_method(self.policy_mgr, 'pub_msg', 'remote', Msg(type = MsgType.POLICY_MGR_PUT_MODEL_META, data = (self.name, model_meta))) | ||
self.ep_reward, self.ep_step = 0, 0 | ||
self.curr_obs, self.curr_info = self.env.reset(seed = self.seed) | ||
self._put_exps() | ||
if self.cfg.mode.lower == "train": self._put_exps() | ||
run_step += 1 | ||
if run_step >= self.n_sample_steps: | ||
break |