Skip to content

Commit

Permalink
Change generate_nature --debug behavior to match generate_indoors
Browse files Browse the repository at this point in the history
  • Loading branch information
araistrick authored and pvl-bot committed Nov 1, 2024
1 parent 4b2119a commit affb689
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions infinigen_examples/generate_indoors.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ def main(args):
parser.add_argument("-d", "--debug", type=str, nargs="*", default=None)

args = init.parse_args_blender(parser)

logging.getLogger("infinigen").setLevel(logging.INFO)
logging.getLogger("infinigen.core.nodes.node_wrangler").setLevel(logging.CRITICAL)

Expand Down
20 changes: 11 additions & 9 deletions infinigen_examples/generate_nature.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,16 +1023,18 @@ def main(args):
"e.g. --gin_param module_1.a=2 module_2.b=3",
)
parser.add_argument("--task_uniqname", type=str, default=None)
parser.add_argument(
"-d",
"--debug",
action="store_const",
dest="loglevel",
const=logging.DEBUG,
default=logging.INFO,
)
parser.add_argument("-d", "--debug", type=str, nargs="*", default=None)

args = init.parse_args_blender(parser)
logging.getLogger("infinigen").setLevel(args.loglevel)

logging.getLogger("infinigen").setLevel(logging.INFO)
logging.getLogger("infinigen.core.nodes.node_wrangler").setLevel(logging.CRITICAL)

if args.debug is not None:
for name in logging.root.manager.loggerDict:
if not name.startswith("infinigen"):
continue
if len(args.debug) == 0 or any(name.endswith(x) for x in args.debug):
logging.getLogger(name).setLevel(logging.DEBUG)

main(args)

0 comments on commit affb689

Please sign in to comment.