Skip to content

Commit 060da6f

Browse files
authored
Update README.md
Mannually solve the conflicts and merge Readme
1 parent 95be0f7 commit 060da6f

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,32 @@ pip install -r requirements.txt
8484
---
8585

8686
## 🔧 Training Examples
87-
<!-- Joshua please helps this part -->
8887
```Python
89-
```
88+
from ltsm.data_pipeline import StatisticalTrainingPipeline, get_args, seed_all
89+
from ltsm.models.base_config import LTSMConfig
90+
from ltsm.common.base_training_pipeline import TrainingConfig
91+
92+
# Option 1: Load config via command-line arguments
93+
config = get_args()
94+
95+
# Option 2: Load config from a JSON file
96+
config = TrainingConfig.load("example.json")
97+
98+
# Option 3: Manually customize a supported model config in code
99+
# (e.g., LTSMConfig, DLinearConfig, InformerConfig, etc.)
100+
config = LTSMConfig(seq_len=336, pred_len=96)
90101

102+
# Set random seeds for reproducibility
103+
seed = config.train_params["seed"]
104+
seed_all(seed)
105+
106+
# Initialize the training pipeline with the loaded config
107+
pipeline = StatisticalTrainingPipeline(config)
108+
109+
# Run the training and evaluation process
110+
pipeline.run()
111+
```
112+
---
91113

92114
## 🔍 Inference Examples
93115

0 commit comments

Comments
 (0)