This message was deleted.
# neural-forecast
s
This message was deleted.
c
Hi @Naveen Chandra! Tune wont stop if there is a bug for each individual run, it will simply go to the next. The error you see occurs when all individual
num_samples
runs failed. I suggest starting simpler, with much smaller configs and less
num_samples
(3, or 5). There are some issues with the config, for instance the
nhits
only have
identity
blocks, no trend or seasonality. Also the numbers of elements in
n_pool_kernel_size
needs to match the number of stacks (length of
stack_types
).
here is a shorter config that should work:
Copy code
config_nhits = {
    "input_size": tune.choice([4, 8]),              # Length of input window
    "start_padding_enabled": True,
    "stack_types": 3*['identity'],
    "n_blocks": 3*[1],                                           # Length of input window
    "mlp_units": 3 * [[128, 128]],                                  # Length of input window
    "n_pool_kernel_size": tune.choice([3*[1], 3*[2], 3*[4]]),            # MaxPooling Kernel size
    "n_freq_downsample": tune.choice([[4, 2, 1],
                                      [1, 1, 1]]),            # Interpolation expressivity ratios
    "learning_rate": tune.loguniform(1e-4, 1e-2),                   # Initial Learning rate
    "scaler_type": tune.choice(['robust', 'standard']),                             # Scaler type
    "max_steps": tune.choice([500, 1000]),                               # Max number of training iterations
    "batch_size": tune.choice([32,64,128]),                          # Number of series in batch
    "windows_batch_size": tune.choice([64, 128, 256]),             # Number of windows in batch
    "random_seed": tune.randint(1, 20),                             # Random seed
}
👍 1
Some other tips:
mlp_units
of 3 is extremely small, I changed it to 128.
batch_size
and
windows_batch_size
of 1 are also too small. Let me know if the config above works. Try with
num_samples=2
while debugging.
👍 1
n
Hi Crisitan, Thanks for such a quick response! I am getting this error which I have no idea how to fix with the config I mentioned. Any pointers around why am I getting this error: RuntimeError: No best trial found for the given metric: loss. This means that no trial has reported this metric, or all values reported for this metric are NaN. To not ignore NaN values, you can set the
filter_nan_and_inf
arg to False."
c
The error you see occurs when all individual
num_samples
runs failed, or have a NaN loss
👍 1
can you try with the config I sent you?
n
@Cristian (Nixtla): Thanks for the config which solved my problem! Really appreciate your quick responses. Any ideas/suggestion as to which specific config might be causing this error so that I can avoid making same mistake in future?
Also I am getting the same issue for LSTM Config as well. A quick note: I am training a very small dataset of 101 time samples of 'weekly' data. Hence I was keeping the mlp_units and other config small. My LSTM Config: config_lstm = { "input_size": tune.choice([4,8]), # Length of input window "encoder_hidden_size": tune.choice([4,8,16,32,64,128]), # Hidden size of LSTM cells "encoder_activation": tune.choice(['relu']), "encoder_n_layers": tune.choice([1,2,3]), # Number of layers in LSTM "learning_rate": tune.loguniform(1e-4, 1e-2), # Initial Learning rate "scaler_type": tune.choice(['robust', 'standard']), # Scaler type "max_steps": tune.choice([100, 200]), # Max number of training iterations "batch_size": tune.choice([2,4,8,16,32,64,128]), # Number of series in batch "random_seed": tune.randint(1, 20), # Random seed "hist_exog_list": ['VOICE_TRAFFIC','SUCCESSFULL_CALLS'] }