Commit 196301fc authored by Mitar's avatar Mitar
Browse files

Explain why docstrings are important.

parent 0085697b
Pipeline #15939688 passed with stage
in 7 minutes and 36 seconds
......@@ -28,6 +28,9 @@ class Hyperparams(hyperparams.Hyperparams):
class IncrementPrimitive(transformer.TransformerPrimitiveBase[Inputs, Outputs, Hyperparams]):
# It is important to provide a docstring because this docstring is used as a description of
# a primitive. Some callers might analyze it to determine the nature and purpose of a primitive.
"""
A primitive which increments each value by a fixed amount, by default 1.
"""
......
......@@ -24,6 +24,9 @@ class Hyperparams(hyperparams.Hyperparams):
class MonomialPrimitive(supervised_learning.SupervisedLearnerPrimitiveBase[Inputs, Outputs, Params, Hyperparams]):
# It is important to provide a docstring because this docstring is used as a description of
# a primitive. Some callers might analyze it to determine the nature and purpose of a primitive.
"""
A primitive which fits output = a * input.
"""
......
......@@ -29,6 +29,9 @@ class Hyperparams(hyperparams.Hyperparams):
class RandomPrimitive(generator.GeneratorPrimitiveBase[Outputs, None, Hyperparams]):
# It is important to provide a docstring because this docstring is used as a description of
# a primitive. Some callers might analyze it to determine the nature and purpose of a primitive.
"""
A primitive which draws random samples from a normal distribution.
"""
......
......@@ -34,6 +34,9 @@ class Hyperparams(hyperparams.Hyperparams):
class SumPrimitive(base.SingletonOutputMixin[Inputs, Outputs, None, Hyperparams], transformer.TransformerPrimitiveBase[Inputs, Outputs, Hyperparams]):
# It is important to provide a docstring because this docstring is used as a description of
# a primitive. Some callers might analyze it to determine the nature and purpose of a primitive.
"""
A primitive which sums all the values on input into one number.
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment