Giter Site home page Giter Site logo

Comments (9)

amyeroberts avatar amyeroberts commented on June 30, 2024 1

cc @kashif

from transformers.

kashif avatar kashif commented on June 30, 2024 1

thanks! having a look

from transformers.

sivavishnubramma avatar sivavishnubramma commented on June 30, 2024

Appreciate it. Please let me know for any additional information that can help with the debugging.

from transformers.

sivavishnubramma avatar sivavishnubramma commented on June 30, 2024

If I understand correctly, the issue is in this code snippet:

sample = {
   'past_values': self.X[idx],
   'past_time_features': torch.zeros((time_dim, feature_dim)), 
   'past_observed_mask': self.observed_mask[idx],
   'future_values': future_values,
   'future_time_features': future_values,
}

Appreciate your timely support!

from transformers.

kashif avatar kashif commented on June 30, 2024

@sivavishnubramma indeed the issue is in the sizes of the inputs... so what are the shapes of "past_values" and "future_values" tensors?

from transformers.

kashif avatar kashif commented on June 30, 2024

also note that the future_time_features are the known covariates int he prediction window (i.e. the known date-time covariates for example or any static covariates)

from transformers.

sivavishnubramma avatar sivavishnubramma commented on June 30, 2024

I added a few time variant to the code. Here are the shapes of the parameter "

Sample 523 - past_values shape: torch.Size([10, 74]), past_time_features shape: torch.Size([10, 74]), past_observed_mask shape: torch.Size([10, 74]), future_values shape: torch.Size([10, 74])
Sample 186 - past_values shape: torch.Size([10, 74]), past_time_features shape: torch.Size([10, 74]), past_observed_mask shape: torch.Size([10, 74]), future_values shape: torch.Size([10, 74])
Sample 441 - past_values shape: torch.Size([10, 74]), past_time_features shape: torch.Size([10, 74]), past_observed_mask shape: torch.Size([10, 74]), future_values shape: torch.Size([10, 74])

fyi- Prior to adding the time variants, the shape was [10, 70]

from transformers.

sivavishnubramma avatar sivavishnubramma commented on June 30, 2024

The error messages are somewhat challenging for someone new to this area to decode. I have a more specific question regarding dataset construction for the Time Series Transformed Model training:

  1. I have a dataset from a CSV file with columns: {Date, Open, Close, Volume, Price_change, Bull_Bear_Signal}.
  2. I've added the following time-related features: {'day_of_week', 'month_of_year'}, increasing the total feature count to 8, including the Date.
  3. I then removed the Date column, leaving 7 features in the dataset.
  4. The look-back period is set to 10, and the prediction length is 1.
  5. The model outputs 2 predictions: {Price_change, Bull_Bear_Signal}.

Could you please guide me on how to correctly structure the following dataset to avoid previous errors and ensure successful model training?
(OR)
If there is a builder/adapter class that gets the user requirement similar to the above list and produces the dataset necessary to train the model, please let me know.

sample = {
    'past_values': <>,
    'past_time_features': <>,
    'past_observed_mask': <>,
    'future_values': <>,
    'future_time_features': <>
}

Let me know for any additional details.

from transformers.

kashif avatar kashif commented on June 30, 2024

@sivavishnubramma we do have a blog post explaining the inputs and what the batch samples should be here: https://huggingface.co/blog/time-series-transformers

did you manage to have a read of the blog post?

from transformers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.