mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-06-07 00:13:37 +00:00
Consistent use of device as keyword argument (#702)
* consistent device as keyword arg * Fixed ``device`` arg inconsistency in changelog
This commit is contained in:
parent
798b16aaf7
commit
d496cd4d95
3 changed files with 5 additions and 4 deletions
|
|
@ -38,6 +38,7 @@ Others:
|
|||
- Added a warning in the env checker when not using ``np.float32`` for continuous actions
|
||||
- Improved test coverage and error message when checking shape of observation
|
||||
- Added ``newline="\n"`` when opening CSV monitor files so that each line ends with ``\r\n`` instead of ``\r\r\n`` on Windows while Linux environments are not affected (@hsuehch)
|
||||
- Fixed ``device`` argument inconsistency (@qgallouedec)
|
||||
|
||||
Documentation:
|
||||
^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -197,14 +197,14 @@ class OffPolicyAlgorithm(BaseAlgorithm):
|
|||
self.buffer_size,
|
||||
self.observation_space,
|
||||
self.action_space,
|
||||
self.device,
|
||||
device=self.device,
|
||||
optimize_memory_usage=self.optimize_memory_usage,
|
||||
)
|
||||
|
||||
self.replay_buffer = HerReplayBuffer(
|
||||
self.env,
|
||||
self.buffer_size,
|
||||
self.device,
|
||||
device=self.device,
|
||||
replay_buffer=replay_buffer,
|
||||
**self.replay_buffer_kwargs,
|
||||
)
|
||||
|
|
@ -214,7 +214,7 @@ class OffPolicyAlgorithm(BaseAlgorithm):
|
|||
self.buffer_size,
|
||||
self.observation_space,
|
||||
self.action_space,
|
||||
self.device,
|
||||
device=self.device,
|
||||
n_envs=self.n_envs,
|
||||
optimize_memory_usage=self.optimize_memory_usage,
|
||||
**self.replay_buffer_kwargs,
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class OnPolicyAlgorithm(BaseAlgorithm):
|
|||
self.n_steps,
|
||||
self.observation_space,
|
||||
self.action_space,
|
||||
self.device,
|
||||
device=self.device,
|
||||
gamma=self.gamma,
|
||||
gae_lambda=self.gae_lambda,
|
||||
n_envs=self.n_envs,
|
||||
|
|
|
|||
Loading…
Reference in a new issue