|
18 | 18 | # python -m grpc.tools.protoc --python_out=. --grpc_python_out=. -I. tensorflow_serving/apis/prediction_service.proto |
19 | 19 | import grpc |
20 | 20 |
|
21 | | -from tensorflow_serving.apis import classification_pb2 as tensorflow__serving_dot_apis_dot_classification__pb2 |
22 | | -from tensorflow_serving.apis import get_model_metadata_pb2 as tensorflow__serving_dot_apis_dot_get__model__metadata__pb2 |
23 | | -from tensorflow_serving.apis import inference_pb2 as tensorflow__serving_dot_apis_dot_inference__pb2 |
24 | | -from tensorflow_serving.apis import predict_pb2 as tensorflow__serving_dot_apis_dot_predict__pb2 |
25 | | -from tensorflow_serving.apis import regression_pb2 as tensorflow__serving_dot_apis_dot_regression__pb2 |
| 21 | +from tensorflow_serving.apis import ( |
| 22 | + classification_pb2 as tensorflow__serving_dot_apis_dot_classification__pb2, |
| 23 | +) |
| 24 | +from tensorflow_serving.apis import ( |
| 25 | + get_model_metadata_pb2 as tensorflow__serving_dot_apis_dot_get__model__metadata__pb2, |
| 26 | +) |
| 27 | +from tensorflow_serving.apis import ( |
| 28 | + inference_pb2 as tensorflow__serving_dot_apis_dot_inference__pb2, |
| 29 | +) |
| 30 | +from tensorflow_serving.apis import ( |
| 31 | + predict_pb2 as tensorflow__serving_dot_apis_dot_predict__pb2, |
| 32 | +) |
| 33 | +from tensorflow_serving.apis import ( |
| 34 | + regression_pb2 as tensorflow__serving_dot_apis_dot_regression__pb2, |
| 35 | +) |
26 | 36 |
|
27 | 37 |
|
28 | | -class PredictionServiceStub(object): |
| 38 | +class PredictionServiceStub: |
29 | 39 | """open source marker; do not remove |
30 | 40 | PredictionService provides access to machine-learned models loaded by |
31 | 41 | model_servers. |
32 | | - """ |
| 42 | + """ # noqa: D205 |
33 | 43 |
|
34 | 44 | def __init__(self, channel): |
35 | 45 | """Constructor. |
@@ -64,43 +74,43 @@ def __init__(self, channel): |
64 | 74 | ) |
65 | 75 |
|
66 | 76 |
|
67 | | -class PredictionServiceServicer(object): |
| 77 | +class PredictionServiceServicer: |
68 | 78 | """open source marker; do not remove |
69 | 79 | PredictionService provides access to machine-learned models loaded by |
70 | 80 | model_servers. |
71 | | - """ |
| 81 | + """ # noqa: D205 |
72 | 82 |
|
73 | | - def Classify(self, request, context): |
| 83 | + def Classify(self, request, context): # noqa: ARG002 |
74 | 84 | """Classify. |
75 | | - """ |
| 85 | + """ # noqa: D200 |
76 | 86 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
77 | 87 | context.set_details('Method not implemented!') |
78 | 88 | raise NotImplementedError('Method not implemented!') |
79 | 89 |
|
80 | | - def Regress(self, request, context): |
| 90 | + def Regress(self, request, context): # noqa: ARG002 |
81 | 91 | """Regress. |
82 | | - """ |
| 92 | + """ # noqa: D200 |
83 | 93 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
84 | 94 | context.set_details('Method not implemented!') |
85 | 95 | raise NotImplementedError('Method not implemented!') |
86 | 96 |
|
87 | | - def Predict(self, request, context): |
| 97 | + def Predict(self, request, context): # noqa: ARG002 |
88 | 98 | """Predict -- provides access to loaded TensorFlow model. |
89 | | - """ |
| 99 | + """ # noqa: D200 |
90 | 100 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
91 | 101 | context.set_details('Method not implemented!') |
92 | 102 | raise NotImplementedError('Method not implemented!') |
93 | 103 |
|
94 | | - def MultiInference(self, request, context): |
| 104 | + def MultiInference(self, request, context): # noqa: ARG002 |
95 | 105 | """MultiInference API for multi-headed models. |
96 | | - """ |
| 106 | + """ # noqa: D200 |
97 | 107 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
98 | 108 | context.set_details('Method not implemented!') |
99 | 109 | raise NotImplementedError('Method not implemented!') |
100 | 110 |
|
101 | | - def GetModelMetadata(self, request, context): |
| 111 | + def GetModelMetadata(self, request, context): # noqa: ARG002 |
102 | 112 | """GetModelMetadata - provides access to metadata for loaded models. |
103 | | - """ |
| 113 | + """ # noqa: D200 |
104 | 114 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
105 | 115 | context.set_details('Method not implemented!') |
106 | 116 | raise NotImplementedError('Method not implemented!') |
|
0 commit comments