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

[⭐] Add to /experiments a predict.py and forecast.py #212

Open
jacoboggleon-bbva opened this issue Dec 7, 2024 · 1 comment
Open

[⭐] Add to /experiments a predict.py and forecast.py #212

jacoboggleon-bbva opened this issue Dec 7, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jacoboggleon-bbva
Copy link

jacoboggleon-bbva commented Dec 7, 2024

Description of the new feature / enhancement | 您所需的新功能或能力

The goal is to add scripts (predict.py and/or forecast.py) to the /experiments directory to enable inference capabilities for trained models in BasicTS. These scripts would allow users to:

  1. Perform one-step predictions using .predict.
  2. Perform multi-step forecasting over a window using .forecast.

Scenario when this would be used? | 使用场景

  1. Production Inference:
    Users can generate predictions for real-time applications, such as forecasting weather conditions or other time series data.
  2. Testing New Data:
    Users can test their trained models on unseen sequences, enabling a practical evaluation of model performance in various scenarios.
  3. Pipeline Integration:
    The scripts would integrate seamlessly with other BasicTS components, such as training and evaluation, for end-to-end workflows.

Supporting information | 附加信息

  • Functionalities:

    • predict.py: For one-step predictions, taking an input sequence and returning the next predicted value.
    • forecast.py: For multi-step forecasting, taking an input sequence and generating predictions over a user-defined window.
  • Inputs and Outputs:

    • Inputs: Processed data sequences (e.g., .npz or .csv files).
    • Outputs: Predictions saved as .npz files or printed to the console for user inspection.
  • Proposed API:
    # One-step prediction
    python experiments/predict.py --cfg baselines.PatchTST.Weather --input /path/to/input.csv --output /path/to/output.csv

    # Multi-step forecasting
    python experiments/forecast.py --cfg baselines.PatchTST.Weather --input /path/to/input.csv --forecast-steps 168 --output /path/to/output.csv

  • References

    • Training script: /experiments/train.py.
    • Evaluation script: /experiments/evaluate.py.

Adding these scripts would enhance BasicTS’s functionality by providing a complete workflow for time series prediction and forecasting.

@jacoboggleon-bbva jacoboggleon-bbva added enhancement New feature or request needs-triaged for issues raised to be triaged labels Dec 7, 2024
@zezhishao zezhishao self-assigned this Dec 8, 2024
@zezhishao
Copy link
Collaborator

Thank you very much for your detailed proposals. This is very meaningful! We will add this feature as soon as possible.

@duyifanict duyifanict removed the needs-triaged for issues raised to be triaged label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants