Ruff format docstring Python code (#15792)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
c1882a4327
commit
d27664216b
63 changed files with 370 additions and 374 deletions
|
|
@ -11,9 +11,9 @@ Example:
|
|||
|
||||
x = torch.ones(1, 128, 40, 40)
|
||||
m = Conv(128, 128)
|
||||
f = f'{m._get_name()}.onnx'
|
||||
f = f"{m._get_name()}.onnx"
|
||||
torch.onnx.export(m, x, f)
|
||||
os.system(f'onnxslim {f} {f} && open {f}') # pip install onnxslim
|
||||
os.system(f"onnxslim {f} {f} && open {f}") # pip install onnxslim
|
||||
```
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ def temporary_modules(modules=None, attributes=None):
|
|||
|
||||
Example:
|
||||
```python
|
||||
with temporary_modules({'old.module': 'new.module'}, {'old.module.attribute': 'new.module.attribute'}):
|
||||
with temporary_modules({"old.module": "new.module"}, {"old.module.attribute": "new.module.attribute"}):
|
||||
import old.module # this will now import new.module
|
||||
from old.module import attribute # this will now import new.module.attribute
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue