mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[Ez][BE]: Fix click ImportError in torch/csrc/jit (#153323)
Fixes unnecessary import for torch script. Unblocks #153020 as it appears to fix circular importer linter into importing every Python file under torch Pull Request resolved: https://github.com/pytorch/pytorch/pull/153323 Approved by: https://github.com/ngimel, https://github.com/cyyever
This commit is contained in:
parent
c51bdf5acf
commit
0104ac0f6f
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
import subprocess
|
||||
|
||||
import click
|
||||
|
||||
|
||||
def test(cmd, limit):
|
||||
print(f"Testing PYTORCH_JIT_OPT_LIMIT=tensorexpr_fuser={limit} {cmd}")
|
||||
|
|
@ -26,8 +24,6 @@ def test(cmd, limit):
|
|||
return 0
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("--cmd")
|
||||
def bisect(cmd):
|
||||
last_good = 0
|
||||
first_bad = 10000
|
||||
|
|
@ -69,4 +65,11 @@ def bisect(cmd):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
bisect()
|
||||
import click
|
||||
|
||||
@click.command()
|
||||
@click.option("--cmd", required=True)
|
||||
def cli(cmd):
|
||||
bisect(cmd)
|
||||
|
||||
cli()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user