Skip to content

Conversation

@nadiaya
Copy link
Contributor

@nadiaya nadiaya commented Jan 31, 2019

Fix docstrings warnings.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@nadiaya nadiaya requested review from iquintero and laurenyu January 31, 2019 06:14
* 'Subnets' (list[str]): List of subnet ids.
* 'SecurityGroupIds' (list[str]): List of security group ids.
"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really? this newline is required? 😕

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, but we had it in other places, so for consistency :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in most places we try not to include that newline: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, in the example you posted there is a new line everywhere after Args and Returns which we don't do almost anywhere.
This change made it more consistent with this particular file which i personally consider an improvement.
We can agree on the format and update all the docstrings to follow it. Though I don't think any of that is enforced by the sphinx or flake.

"""

def __init__(self, model_data, role=None, spark_version=2.2, sagemaker_session=None, **kwargs):
"""Initialize a SparkMLModel..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the second period

def __init__(self, training_steps=None, evaluation_steps=None, checkpoint_path=None, py_version='py2',
framework_version=None, model_dir=None, requirements_file='', image_name=None,
script_mode=False, distributions=None, **kwargs):
"""Initialize an ``TensorFlow`` estimator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/an/a


class TensorFlowPredictor(RealTimePredictor):
"""A ``RealTimePredictor`` for inference against TensorFlow ``Endpoint``s.
"""A ``RealTimePredictor`` for inference against TensorFlow ``Endpoint``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change this to "a TensorFlow endpoint"

@nadiaya nadiaya merged commit d37581a into master Jan 31, 2019
@laurenyu laurenyu deleted the doc-warnings branch February 1, 2019 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants