title: Unknown category '2' encountered. Set `add_nan=True` to allow unknown categories pytorch_forecasting
body: <p>error: &quot;Unknown category '2' encountered. Set <code>add_nan=True</code> to allow unknown categories&quot; while creating time series dataset in pytorch forecasting.</p>
  <pre><code>training = TimeSeriesDataSet(
  train,
  time_idx=&quot;index&quot;,
  target=dni,
  group_ids=[&quot;Solar Zenith Angle&quot;, &quot;Relative Humidity&quot;,&quot;Dew 
  Point&quot;,&quot;Temperature&quot;,&quot;Precipitable Water&quot;, &quot;Wind Speed&quot;],
  min_encoder_length=max_encoder_length // 2,  # keep encoder length long (as it is in the 
  validation set)
  max_encoder_length=max_encoder_length,
  min_prediction_length=1,
  max_prediction_length=max_prediction_length,
  static_reals=[&quot;Wind Direction&quot;],
  time_varying_known_reals=[&quot;index&quot;, &quot;Solar Zenith Angle&quot;, &quot;Relative Humidity&quot;,&quot;Dew 
  Point&quot;,&quot;Temperature&quot;,&quot;Precipitable Water&quot;],
  #     time_varying_unknown_categoricals=[],
  time_varying_unknown_reals=[dhi,dni,ghi],
  categorical_encoders={data.columns[2]: NaNLabelEncoder(add_nan=True)},
  target_normalizer=GroupNormalizer(
      groups=[&quot;Solar Zenith Angle&quot;, &quot;Relative Humidity&quot;,&quot;Dew 
  Point&quot;,&quot;Temperature&quot;,&quot;Precipitable Water&quot;, &quot;Wind Speed&quot;], transformation=&quot;softplus&quot;
  ),  # use softplus and normalize by group
  add_relative_time_idx=True,
  add_target_scales=True,
  add_encoder_length=True,
  </code></pre>
  <p>)</p>