File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -319,7 +319,6 @@ def _add_evaluation_args(parser) -> None:
319
319
)
320
320
321
321
322
- # TODO: Refactor arg_init to be more modular
323
322
def arg_init (args ):
324
323
if not (torch .__version__ > "2.3" ):
325
324
raise RuntimeError (
@@ -329,11 +328,6 @@ def arg_init(args):
329
328
if sys .version_info .major != 3 or sys .version_info .minor < 10 :
330
329
raise RuntimeError ("Please use Python 3.10 or later." )
331
330
332
- # TODO: Don't initialize for Inventory management subcommands
333
- # Remove when arg_init is refactored
334
- if args .command in INVENTORY_VERBS :
335
- return args
336
-
337
331
if hasattr (args , "quantize" ) and Path (args .quantize ).is_file ():
338
332
with open (args .quantize , "r" ) as f :
339
333
args .quantize = json .loads (f .read ())
Original file line number Diff line number Diff line change 12
12
from cli import (
13
13
add_arguments_for_verb ,
14
14
KNOWN_VERBS ,
15
+ INVENTORY_VERBS ,
15
16
arg_init ,
16
17
check_args ,
17
18
)
49
50
50
51
# Now parse the arguments
51
52
args = parser .parse_args ()
52
- args = arg_init (args )
53
+
54
+ # Don't initialize for Inventory management subcommands
55
+ # TODO: Remove when arg_init is refactored
56
+ if args .command not in INVENTORY_VERBS :
57
+ args = arg_init (args )
53
58
logging .basicConfig (
54
59
format = "%(message)s" , level = logging .DEBUG if args .verbose else logging .INFO
55
60
)
You can’t perform that action at this time.
0 commit comments