You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At train_trajnet.py#L41, the --trajcontrol argument is defined with default=False and type=bool, but it always evaluates to True when passed via the CLI, even if explicitly set to False. This is due to the misuse of type=bool, which interprets any non-empty string (e.g., "False") as True.
Steps to Reproduce
Define --trajcontrol as:
group.add_argument("--trajcontrol", default=False, type=bool, help="If True, finetune trajnet with TrajControl")
Run:
python train_trajnet.py --trajcontrol False
Observe:
ipdb>print(args.trajcontrol)
True
Suggested Fix
Replace type=bool with:
type=lambdax: x.lower() in ['true', '1']
Or use action='store_true':
group.add_argument("--trajcontrol", action='store_true', help="If set, finetune trajnet with TrajControl")
The text was updated successfully, but these errors were encountered:
Description
At train_trajnet.py#L41, the
--trajcontrol
argument is defined withdefault=False
andtype=bool
, but it always evaluates toTrue
when passed via the CLI, even if explicitly set toFalse
. This is due to the misuse oftype=bool
, which interprets any non-empty string (e.g.,"False"
) asTrue
.Steps to Reproduce
Define
--trajcontrol
as:Run:
Observe:
Suggested Fix
type=bool
with:action='store_true'
:The text was updated successfully, but these errors were encountered: