megvii-research / hpman

A hyperparameter manager for deep learning experiments.
MIT License
95 stars 11 forks source link

Set and then read #11

Open sshao0516 opened 5 years ago

sshao0516 commented 5 years ago

For the characteristics of the hyperparameters, a kind of global constants, should not be changed after setting. This is the essential difference between a hyperparameter and a variable.

Whether we should add a limit: In runtime, when a hyperparameter is read, will be read-only. Then it can't be changed. This limit ensures that the value of the global getting hyperparameter is consistent. This limit is also in line with the idea of "pattern matching".

bigeagle commented 5 years ago

Single-assignment is easy in current implementation.

zxytim commented 4 years ago

For the characteristics of the hyperparameters, a kind of global constants, should not be changed after setting. This is the essential difference between a hyperparameter and a variable.

Whether we should add a limit: In runtime, when a hyperparameter is read, will be read-only. Then it can't be changed. This limit ensures that the value of the global getting hyperparameter is consistent. This limit is also in line with the idea of "pattern matching".

This is not necessary and cuts off some of the normal uses. e.g. in a grid search script

hps: List[dict] = blahblahblah
for hp in hps:
    _.set_values(hp)
    run()

I tend to not enforce this constraint. Will be closing this issue in a week if no further comments.