Skip to content

Latest commit

 

History

History
94 lines (53 loc) · 5.18 KB

File metadata and controls

94 lines (53 loc) · 5.18 KB
graph LR
    run_py["run.py"]
    argparse["argparse"]
    Exp_Long_Term_Forecast["Exp_Long_Term_Forecast"]
    Exp_Short_Term_Forecast["Exp_Short_Term_Forecast"]
    Exp_Imputation["Exp_Imputation"]
    Exp_Anomaly_Detection["Exp_Anomaly_Detection"]
    Exp_Classification["Exp_Classification"]
    run_py -- "uses" --> argparse
    argparse -- "supplies arguments to" --> run_py
    run_py -- "instantiates" --> Exp_Long_Term_Forecast
    run_py -- "configures and orchestrates" --> Exp_Long_Term_Forecast
    run_py -- "instantiates" --> Exp_Short_Term_Forecast
    run_py -- "configures and orchestrates" --> Exp_Short_Term_Forecast
    run_py -- "instantiates" --> Exp_Imputation
    run_py -- "configures and orchestrates" --> Exp_Imputation
    run_py -- "instantiates" --> Exp_Anomaly_Detection
    run_py -- "configures and orchestrates" --> Exp_Anomaly_Detection
    run_py -- "instantiates" --> Exp_Classification
    run_py -- "configures and orchestrates" --> Exp_Classification
Loading

CodeBoardingDemoContact

Details

The TimeMixer project's core execution flow is orchestrated by run.py, which serves as the main entry point. It leverages the standard argparse library to process command-line arguments, allowing users to specify experiment parameters such as the task_name. Based on this input, run.py dynamically instantiates and subsequently configures and orchestrates the appropriate experiment class (e.g., Exp_Long_Term_Forecast, Exp_Imputation, etc.). Each Exp_ component encapsulates the specialized logic for a particular time series task, handling data loading, model training, and evaluation, thereby centralizing the experiment-specific functionalities. This design promotes modularity, allowing new experiment types to be integrated by adding new Exp_ classes.

run.py

The main entry point of the application. It is responsible for defining and parsing all command-line arguments, setting up global configurations (e.g., random seeds, GPU usage), dynamically selecting the appropriate experiment class based on the task_name argument, and initiating the training and testing phases.

Related Classes/Methods:

argparse

A standard Python library component used by run.py to define and parse command-line arguments. It provides the structured mechanism for users to input experiment parameters such as task_name, model_id, seq_len, learning_rate, and use_gpu. As a standard library, its source is external to this project.

Related Classes/Methods:

Exp_Long_Term_Forecast

Encapsulates the specific logic for long-term time series forecasting experiments. This includes data loading, model definition, the training loop, evaluation metrics, and checkpointing mechanisms tailored for this task.

Related Classes/Methods:

Exp_Short_Term_Forecast

Manages the specific logic for short-term time series forecasting experiments, covering data handling, model training, and evaluation relevant to shorter prediction horizons.

Related Classes/Methods:

Exp_Imputation

Handles the experiment logic for time series imputation, including the specific data preparation, model application, and evaluation strategies required to fill missing values in time series data.

Related Classes/Methods:

Exp_Anomaly_Detection

Contains the specialized logic for conducting anomaly detection experiments on time series data. This involves unique data loading, model training, and evaluation methods designed to identify unusual patterns.

Related Classes/Methods:

Exp_Classification

Manages the experiment flow for time series classification tasks. It defines how data is loaded, models are trained, and predictions are evaluated for categorizing time series.

Related Classes/Methods: