-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix docstrings warnings. #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/sagemaker/amazon/knn.py
Outdated
| * 'Subnets' (list[str]): List of subnet ids. | ||
| * 'SecurityGroupIds' (list[str]): List of security group ids. | ||
| """ | ||
|
|
There was a problem hiding this comment.
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? 😕
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
src/sagemaker/sparkml/model.py
Outdated
| """ | ||
|
|
||
| def __init__(self, model_data, role=None, spark_version=2.2, sagemaker_session=None, **kwargs): | ||
| """Initialize a SparkMLModel.. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/an/a
src/sagemaker/tensorflow/model.py
Outdated
|
|
||
| class TensorFlowPredictor(RealTimePredictor): | ||
| """A ``RealTimePredictor`` for inference against TensorFlow ``Endpoint``s. | ||
| """A ``RealTimePredictor`` for inference against TensorFlow ``Endpoint``. |
There was a problem hiding this comment.
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"
Fix docstrings warnings.
Merge Checklist
Put an
xin 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.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.