mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[BE] Enable ruff's UP rules and autoformat benchmarks/ (#105429)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105429 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
9c225c9b9a
commit
5ef023b05a
@ -355,14 +355,14 @@ def run_benchmark(rank, args, data):
|
||||
rpc.shutdown()
|
||||
|
||||
|
||||
def get_json_config(file_name, id):
|
||||
def get_json_config(file_name: str, id: str):
|
||||
r"""
|
||||
A function that loads a json configuration from a file.
|
||||
Args:
|
||||
file_name (str): name of configuration file to load
|
||||
id (str): configuration that will be loaded
|
||||
"""
|
||||
with open(os.path.join(Path(__file__).parent, file_name), "r") as f:
|
||||
with open(Path(__file__).parent / file_name) as f:
|
||||
json_config = json.load(f)[id]
|
||||
return json_config
|
||||
|
||||
|
Reference in New Issue
Block a user