Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

-tblog interprets nearly all inputs as True #973

Closed
stephenroller opened this issue Jul 11, 2018 · 1 comment
Closed

-tblog interprets nearly all inputs as True #973

stephenroller opened this issue Jul 11, 2018 · 1 comment
Assignees

Comments

@stephenroller
Copy link
Contributor

Currently, passing anything but the explicit empty string to -tblog sets the option to True, due to how bool(string) works in Python. This currently is inconsistent with the rest of ParlAI.

logger.add_argument('-tblog', '--tensorboard-log', type=bool, default=False,

This should be type='bool'. The rest of ParlAI uses this in order to interpet explicit arguments like y, n, false, ... as the values.

See

'--hide-labels', default=False, type='bool',

@uralik
Copy link
Contributor

uralik commented Jul 11, 2018

got it, thanks for the catch!

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

No branches or pull requests

2 participants