Micah Denver
12/17/2024, 11:07 PMhorizon = 1
config = {
"input_size": tune.choice([24, 72, 168]),
"hidden_size": tune.choice([64, 128, 256]),
"n_head": tune.choice([4, 8, 16]),
"grn_activation": tune.choice(["LeakyReLU", "ELU"]),
"learning_rate": tune.choice([1e-1, 1e-2, 1e-3]),
"scaler_type": tune.choice(["standard", "robust"]),
"max_steps": tune.choice([100, 250, 500]),
"batch_size": tune.choice([64, 128, 256]),
"windows_batch_size": tune.choice([128, 256, 512]),
"random_seed": 42
}
models = [AutoTFT(h=horizon,
config=config,
loss=MAE(),
valid_loss=MAE(),
gpus=1,
num_samples=100)]
nf = NeuralForecast(models=models, freq='h')
nf.fit(X_train_val)
Marco
12/18/2024, 2:40 PMsearch_alg
argument. Something like:
from ray.tune.search.bohb import TuneBOHB
model = AutoNHITS(
h=12,
loss=MAE(),
config=nhits_config,
search_alg=TuneBOHB(),
backend='ray',
num_samples=10
)
For the scheduler, however, I'm not sure how to specify it.Micah Denver
12/18/2024, 4:45 PM