From 9d072e06810f9c9348349134f64d3ae4c592d662 Mon Sep 17 00:00:00 2001 From: Bryon Tjanaka Date: Thu, 25 Jan 2024 17:40:05 -0800 Subject: [PATCH] Update some docstrings --- ribs/emitters/_gradient_operator_emitter.py | 2 +- ribs/emitters/operators/_iso_line.py | 10 +++++----- ribs/emitters/operators/_operator_base.py | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ribs/emitters/_gradient_operator_emitter.py b/ribs/emitters/_gradient_operator_emitter.py index d4db3ce20..a6061b438 100644 --- a/ribs/emitters/_gradient_operator_emitter.py +++ b/ribs/emitters/_gradient_operator_emitter.py @@ -67,7 +67,7 @@ class GradientOperatorEmitter(EmitterBase): sigma_g (float): Step size used for gradient arborescence in ask(), branching from the parents generated by ask_dqd(). If measure gradients are used, this acts as the standard deviation of the - Gaussian from which to sample the step size.Other wise, this acts as + Gaussian from which to sample the step size. Otherwise, this acts as the step size itself. initial_solutions (array-like): An (n, solution_dim) array of solutions to be used when the archive is empty. If this argument is None, then diff --git a/ribs/emitters/operators/_iso_line.py b/ribs/emitters/operators/_iso_line.py index f4e7f25d1..72c95dd5e 100644 --- a/ribs/emitters/operators/_iso_line.py +++ b/ribs/emitters/operators/_iso_line.py @@ -12,7 +12,7 @@ class IsoLineOperator(OperatorBase): Args: iso_sigma (float): Scale factor for the isotropic distribution used to - generate solutions. + generate solutions. line_sigma (float): Scale factor for the line distribution used when generating solutions. sigma (float or array-like): Standard deviation of the Gaussian @@ -48,10 +48,10 @@ def ask(self, parents): """ Adds Isotropic Guassian noise and directional noise to parents. Args: - parents (array-like): (2, batch_size, solution_dim) - parents[0] array of solutions selected by emitter - parents[1] array of second batch of solutions passed by - emitter. Used for calculating directional correlation. + parents (array-like): (2, batch_size, solution_dim) parents[0] array + of solutions selected by emitter parents[1] array of second + batch of solutions passed by emitter. Used for calculating + directional correlation. Returns: numpy.ndarray: ``(batch_size, solution_dim)`` array that contains diff --git a/ribs/emitters/operators/_operator_base.py b/ribs/emitters/operators/_operator_base.py index b3fb1e413..c62f82c4b 100644 --- a/ribs/emitters/operators/_operator_base.py +++ b/ribs/emitters/operators/_operator_base.py @@ -14,9 +14,8 @@ def ask(self, parents): """Operates on parents to generate new solutions. Args: - parents (array-like): (batch_size, solution_dim) array of - solutions to be mutated. Typically passed in by an emitter - after selection from an archive. + parents (array-like): Array of solutions to be mutated. Typically + passed in by an emitter after selection from an archive. Returns: numpy.ndarray: ``(batch_size, solution_dim)`` array that contains