File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 40
40
41
41
_TIMEOUT = 1.0
42
42
_MIN_TIMEOUT = 1e-3 # should be several orders of magnitude inferior wrt time spent collecting a trajectory
43
- _MAX_IDLE_COUNT = int (os .environ .get ("MAX_IDLE_COUNT" , 10 ))
43
+ _MAX_IDLE_COUNT = int (os .environ .get ("MAX_IDLE_COUNT" , 1000 ))
44
44
45
45
46
46
class RandomPolicy :
Original file line number Diff line number Diff line change 3
3
# This source code is licensed under the MIT license found in the
4
4
# LICENSE file in the root directory of this source tree.
5
5
6
- from dataclasses import dataclass
6
+ from dataclasses import dataclass , field
7
+ from typing import Any
7
8
8
9
9
10
@dataclass
@@ -19,3 +20,5 @@ class RecorderConfig:
19
20
# number of batch collections in between two collections of validation rollouts. Default=1000.
20
21
record_frames : int = 1000
21
22
# number of steps in validation rollouts. " "Default=1000.
23
+ recorder_log_keys : Any = field (default_factory = lambda : ["reward" ])
24
+ # Keys to log in the recorder
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ def make_trainer(
248
248
policy_exploration = policy_exploration ,
249
249
recorder = recorder ,
250
250
record_interval = cfg .record_interval ,
251
+ log_keys = cfg .recorder_log_keys ,
251
252
)
252
253
trainer .register_op (
253
254
"post_steps_log" ,
@@ -262,7 +263,7 @@ def make_trainer(
262
263
record_interval = cfg .record_interval ,
263
264
exploration_mode = "random" ,
264
265
suffix = "exploration" ,
265
- out_key = " r_evaluation_exploration" ,
266
+ out_keys = { "reward" : " r_evaluation_exploration"} ,
266
267
)
267
268
trainer .register_op (
268
269
"post_steps_log" ,
You can’t perform that action at this time.
0 commit comments