Skip to content

Commit ddcf078

Browse files
authored
add fire clean up docstrings in create policies (#4391)
1 parent 38c1007 commit ddcf078

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

ml-agents/mlagents/trainers/ppo/trainer.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,10 @@ def create_tf_policy(
216216
create_graph: bool = False,
217217
) -> TFPolicy:
218218
"""
219-
Creates a PPO policy to trainers list of policies.
219+
Creates a policy with a Tensorflow backend and PPO hyperparameters
220+
:param parsed_behavior_id:
220221
:param behavior_spec: specifications for policy construction
221-
:param create_graph: whether to create the graph when policy is constructed
222+
:param create_graph: whether to create the Tensorflow graph on construction
222223
:return policy
223224
"""
224225
policy = TFPolicy(
@@ -234,9 +235,9 @@ def create_torch_policy(
234235
self, parsed_behavior_id: BehaviorIdentifiers, behavior_spec: BehaviorSpec
235236
) -> TorchPolicy:
236237
"""
237-
Creates a PPO policy to trainers list of policies.
238+
Creates a policy with a PyTorch backend and PPO hyperparameters
238239
:param parsed_behavior_id:
239-
:param brain_parameters: specifications for policy construction
240+
:param behavior_spec: specifications for policy construction
240241
:return policy
241242
"""
242243
policy = TorchPolicy(

ml-agents/mlagents/trainers/sac/trainer.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ def create_tf_policy(
233233
behavior_spec: BehaviorSpec,
234234
create_graph: bool = False,
235235
) -> TFPolicy:
236+
"""
237+
Creates a policy with a Tensorflow backend and SAC hyperparameters
238+
:param parsed_behavior_id:
239+
:param behavior_spec: specifications for policy construction
240+
:param create_graph: whether to create the Tensorflow graph on construction
241+
:return policy
242+
"""
236243
policy = TFPolicy(
237244
self.seed,
238245
behavior_spec,
@@ -248,7 +255,7 @@ def create_torch_policy(
248255
self, parsed_behavior_id: BehaviorIdentifiers, behavior_spec: BehaviorSpec
249256
) -> TorchPolicy:
250257
"""
251-
Creates a PPO policy to trainers list of policies.
258+
Creates a policy with a PyTorch backend and SAC hyperparameters
252259
:param parsed_behavior_id:
253260
:param behavior_spec: specifications for policy construction
254261
:return policy

0 commit comments

Comments
 (0)