vars()
-
Create a class
ParamGroupto store args into instance variables, then usevars(self)to read memebers fromself.__dict__. -
Add each argument into parser through
parser.add_argument(). -
Set shorthand to the initial character, e.g.,
--source_pathuse-s
Example from gaussian-splatting:
|
|
(2024-04-03)
-
In this way, there won’t be a long list of
parser.add_argument()declaiming all arguments.Instead, related arguments are arranged into a group.
Customize Parsing
(2023-09-27)
-
Analyse string manually
Refer to Match-NeRF for an example.