Skip to content

Commit

Permalink
Fix Pylint Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
w11wo committed Sep 27, 2024
1 parent 92e44a4 commit 3ae05ad
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions g2p_id/onnx_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
"""
Copyright 2023 [PT BOOKBOT INDONESIA](https://bookbot.id/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

import onnxruntime as ort


Expand All @@ -12,6 +28,11 @@ def __init__(self, onnx_bytes, sess_options=None, providers=None):
self.providers = providers

def run(self, *args):
"""Wrapper for ONNX InferenceSession run method.
Returns:
Any: Inference result.
"""
return self.sess.run(*args)

def __getstate__(self):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ disable =
R0902,
R0903,
R0914
max-line-length = 120

[coverage:run]
source=g2p_id
Expand Down

0 comments on commit 3ae05ad

Please sign in to comment.