File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ def __init__(
351
351
* ,
352
352
entropy_bonus : bool = True ,
353
353
samples_mc_entropy : int = 1 ,
354
- entropy_coeff : float | Mapping [ str | tuple | list , float ] | None = None ,
354
+ entropy_coeff : float | NestedKey | None = None ,
355
355
log_explained_variance : bool = True ,
356
356
critic_coeff : float | None = None ,
357
357
loss_critic_type : str = "smooth_l1" ,
@@ -460,8 +460,7 @@ def __init__(
460
460
if isinstance (entropy_coeff , Mapping ):
461
461
# Store the mapping for per-head coefficients
462
462
self ._entropy_coeff_map = {
463
- (tuple (k ) if isinstance (k , list ) else k ): float (v )
464
- for k , v in entropy_coeff .items ()
463
+ str (k ): float (v ) for k , v in entropy_coeff .items ()
465
464
}
466
465
# Register an empty buffer for compatibility
467
466
self .register_buffer ("entropy_coeff" , torch .tensor (0.0 ))
You can’t perform that action at this time.
0 commit comments