Hugging Face - Time Series Transformer Error
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_27/4172075850.py in <module>
      8     static_real_features=batch1["static_real_features"],
      9     future_values=batch1["future_values"],
---> 10     future_time_features=batch1["future_time_features"]
     11 )

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1188         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1189                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1190             return forward_call(*input, **kwargs)
   1191         # Do not call functions when jit is used
   1192         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.7/site-packages/transformers/models/time_series_transformer/modeling_time_series_transformer.py in forward(self, past_values, past_time_features, past_observed_mask, static_categorical_features, static_real_features, future_values, future_time_features, future_observed_mask, decoder_attention_mask, head_mask, decoder_head_mask, cross_attn_head_mask, encoder_outputs, past_key_values, output_hidden_states, output_attentions, use_cache, return_dict)
   1611             output_attentions=output_attentions,
   1612             use_cache=use_cache,
-> 1613             return_dict=return_dict,
   1614         )
   1615 

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1188         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1189                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1190             return forward_call(*input, **kwargs)
   1191         # Do not call functions when jit is used
   1192         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.7/site-packages/transformers/models/time_series_transformer/modeling_time_series_transformer.py in forward(self, past_values, past_time_features, past_observed_mask, static_categorical_features, static_real_features, future_values, future_time_features, decoder_attention_mask, head_mask, decoder_head_mask, cross_attn_head_mask, encoder_outputs, past_key_values, output_hidden_states, output_attentions, use_cache, return_dict)
   1422             static_real_features=static_real_features,
   1423             future_values=future_values,
-> 1424             future_time_features=future_time_features,
   1425         )
   1426 

/opt/conda/lib/python3.7/site-packages/transformers/models/time_series_transformer/modeling_time_series_transformer.py in create_network_inputs(self, past_values, past_time_features, static_categorical_features, static_real_features, past_observed_mask, future_values, future_time_features)
   1322             static_feat = torch.cat((static_real_features, static_feat), dim=1)
   1323         if static_categorical_features is not None:
-> 1324             embedded_cat = self.embedder(static_categorical_features)
   1325             static_feat = torch.cat((embedded_cat, static_feat), dim=1)
   1326         expanded_static_feat = static_feat.unsqueeze(1).expand(-1, time_feat.shape[1], -1)

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in __getattr__(self, name)
   1264                 return modules[name]
   1265         raise AttributeError("'{}' object has no attribute '{}'".format(
-> 1266             type(self).__name__, name))
   1267 
   1268     def __setattr__(self, name: str, value: Union[Tensor, 'Module']) -> None:

![image](https://user-images.githubusercontent.com/93371014/235079818-1f3f888d-33ba-40be-ad4a-a557e8b54792.png)
<|||||>cc @kashif <|||||>@modiparv I believe you have configured the model with `num_static_categorical_features=0` and yet you are feeding the model static categorical covariates as the `static_categorical_features` input... perhaps kindly test without it and I can add an extra check there... <|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.