Copying HParams returns dict
Closed this issue · 1 comments
thelostscout commented
Copying a previously created hparams instance creates a dict instead.
Minimal working example:
import lightning_trainable as lt
hparams = dict(
batch_size = 1024,
max_epochs = 20,
n_dims = 2,
optimizer = {
"name": "Adam",
"lr": 3.e-3,
},
gradient_clip = 10.0,
)
hparams = lt.TrainableHParams(hparams)
hparams2 = hparams.copy()
print(type(hparams2)
I am not sure if this is intended. If it is, it wasn't obvious to me that I should expect this reaction.
LarsKue commented
Not intentional. Fixed in the next minor version.