Hi, Below, instead of using the default ray random...
# neural-forecast
m
Hi, Below, instead of using the default ray random search, how can I implement ray TuneBOHB (and if needed, scheduler HyperBandForBOHB) ? I’m having trouble with the documentation details. Thank you!
Copy code
horizon = 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)
m
Hello! You can specify the search algorithm using the
search_alg
argument. Something like:
Copy code
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.
m
Okay, thank you!