Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
datadrivendiscovery
tests-data
Commits
196301fc
Commit
196301fc
authored
Jan 09, 2018
by
Mitar
Browse files
Explain why docstrings are important.
parent
0085697b
Pipeline
#15939688
passed with stage
in 7 minutes and 36 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
0 deletions
+12
-0
primitives/test_primitives/increment.py
primitives/test_primitives/increment.py
+3
-0
primitives/test_primitives/monomial.py
primitives/test_primitives/monomial.py
+3
-0
primitives/test_primitives/random.py
primitives/test_primitives/random.py
+3
-0
primitives/test_primitives/sum.py
primitives/test_primitives/sum.py
+3
-0
No files found.
primitives/test_primitives/increment.py
View file @
196301fc
...
...
@@ -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.
"""
...
...
primitives/test_primitives/monomial.py
View file @
196301fc
...
...
@@ -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.
"""
...
...
primitives/test_primitives/random.py
View file @
196301fc
...
...
@@ -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.
"""
...
...
primitives/test_primitives/sum.py
View file @
196301fc
...
...
@@ -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.
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment