Hi <@U03UX9KR75W>, Is it possible to set a fixed ...
# neural-forecast
l
Hi @José Morales, Is it possible to set a fixed random seed in e.g. 'random_seed': tune.randint(1, 20)? I saw from the output, it seems to be setting different global seeds. I would like my nfc models to produce the same set of prediction results with the same input data everytime I run the models. Thanks.
j
Do you mean auto models?
l
Yes, @José Morales. I was using that in the Auto Models config
j
Are you using
config=None
? The default seed for all models is 1, however the default configuration for the auto models also tunes the seed
l
Nope. I am using the following config. so what do I need to do to ensure the same random seed everytime e.g. 666?
# config for tunning etc. Most parameters taken of by the Auto models.
myconfig = {'input_size': tune.choice([horizon,horizon*2,horizon*3])
,'batch_size': tune.choice([32,64])
,'max_steps': tune.choice([500])
,'learning_rate': tune.loguniform(1e-4, 1e-2)
,'random_seed': tune.randint(1, 20)
,'scaler_type': tune.choice([None])} # data is already scaled.
j
With that config you're also changing the seed. You should fix it, e.g.
'random_seed': 666
👍 1
l
aha! lovely....thanks a million
👍 1
c
Hi @lobbie lobbie! For auto models there is still randomness in the sampling of the configurations during tuning, so the best model will change every time you run it
👍 1