Open stas00 opened 6 months ago
Oddly, there is a related problem, if I have:
@dataclass
class OptimizerParams:
name: str = "AdamW"
params: Dict[str, Any] = dict_field(
dict(
# learning rate
lr=3e-4,
# betas for adam
betas=[0.9, 0.999],
but in the config file I write:
optimizer:
name: AdamW
params:
betas: (0.9, 0.99)
it has the same problem, the numbers in betas
remains strings.
note, the default uses a list
but the config uses a tuple
If I use the list
instead of tuple
, then it works fine:
betas: [0.9, 0.99]
why does it matter if the definition just says it's a dict...
Thanks for posting @stas00 , I'll take a look!
Describe the bug
If I have:
and in a config file I say:
it fails to convert
1e-4
to float, leaving it as a string.it works fine if I use
lr: 0.001
I had to hack around it with:
simple_parsing==0.1.4
Thanks.