Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: --opt_div_matching always evaluates to True #4

Open
Shubodh opened this issue Apr 21, 2022 · 1 comment
Open

Bug: --opt_div_matching always evaluates to True #4

Shubodh opened this issue Apr 21, 2022 · 1 comment

Comments

@Shubodh
Copy link

Shubodh commented Apr 21, 2022

Usage of arg parser for --opt_div_matching is wrong in the code.

It's a string which always evaluates to True here irrespective of keyword provided, will only evaluate to False if the argument is empty. Rewrite it to something like below code:

parser.add_argument('--my-flag',choices=('True','False'))
arguments = parser.parse_args()
MyFlag = arguments.my_flag == 'True'

instead of

parser.add_argument('--opt_div_matching', default=True, help='True: Divided matching, False: base matching')
if args.opt_div_matching:
    refinement = Refinement_extended(superglue)
else:
    refinement = Refinement_base(superglue)

Source

@Shubodh
Copy link
Author

Shubodh commented Apr 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant