Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Time series] Add PatchTSMixer #26247

Merged
merged 229 commits into from
Dec 5, 2023
Merged

Conversation

ajati
Copy link
Contributor

@ajati ajati commented Sep 19, 2023

PatchTSMixer (KDD 2023) is a lightweight time-series modeling approach based on the MLP-Mixer architecture. In this HuggingFace implementation, we provide PatchTSMixer's capabilities to effortlessly facilitate lightweight mixing across patches, channels, and hidden features for effective multivariate time-series modeling. It also supports various attention mechanisms starting from simple gated attention to more complex self-attention blocks that can be customized accordingly. The model can be pretrained and subsequently used for various downstream tasks such as forecasting, classification and regression.

@kashif

Done: TODOs

  • Add generate method
  • Make pretrained dataset publicly available
  • Make pretrained weights publicly available

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@vijaye12
Copy link
Contributor

@amyeroberts - Greetings! We have enabled all the changes suggested in PatchTST and also the corrections suggested in this PR from the past reviewers. Requesting your review and approval.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this looks a lot better than last time. Left some small nits but should be good to go otherwise

docs/source/en/model_doc/patchtsmixer.md Show resolved Hide resolved
src/transformers/models/auto/modeling_auto.py Outdated Show resolved Hide resolved
forecast_channel_indices (`list`, *optional*):
List of channel indices to forecast. If None, forecast all channels. Target data is expected to have all
channels and we explitly filter the channels in prediction and target before loss computation.
num_targets (`int`, *optional*, defaults to 3):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not resolved

tests/models/patchtsmixer/test_modeling_patchtsmixer.py Outdated Show resolved Hide resolved
@vijaye12
Copy link
Contributor

vijaye12 commented Dec 4, 2023

Hi @ArthurZucker -Thanks for approving this PR. We have resolved all the final changes you mentioned. Please review and help with merge, if all good.

PS: change with respect to adding segment names to docstring is the only one comment pending. When we add segment names in docstring following the syntax ssuggested - it getting auto removed during make fix-ups. Other than this - all other comments are resolved.

@kashif kashif merged commit b242d0f into huggingface:main Dec 5, 2023
23 checks passed
@kashif kashif deleted the add-patchtsmixer branch December 5, 2023 14:31
@ArthurZucker
Copy link
Collaborator

@vijaye12 thanks for bearing with us in this long review! and congrats for the merge! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.