generate train script for users

This commit is contained in:
HengZhang 2024-11-21 18:44:48 +08:00
parent 069ca21618
commit 47a2666530
8 changed files with 223 additions and 5 deletions

View File

@ -1,6 +1,6 @@
use_gpu: True use_gpu: True
seed: 10 seed: 10
device: 1 device: 0
early_stop: early_stop:
patience: 60 patience: 60
federate: federate:
@ -62,7 +62,7 @@ train:
max_grad_norm: 5 max_grad_norm: 5
real_value: True real_value: True
criterion: criterion:
type: RMSE type: L1Loss
trainer: trainer:
type: trafficflowtrainer type: trafficflowtrainer
log_dir: ./ log_dir: ./

View File

@ -64,7 +64,7 @@ train:
max_grad_norm: 5 max_grad_norm: 5
real_value: True real_value: True
criterion: criterion:
type: RMSE type: L1Loss
trainer: trainer:
type: trafficflowtrainer type: trafficflowtrainer
log_dir: ./ log_dir: ./

View File

@ -62,7 +62,7 @@ train:
max_grad_norm: 5 max_grad_norm: 5
real_value: True real_value: True
criterion: criterion:
type: RMSE type: L1Loss
trainer: trainer:
type: trafficflowtrainer type: trafficflowtrainer
log_dir: ./ log_dir: ./

View File

@ -60,7 +60,7 @@ train:
grad_norm: True grad_norm: True
real_value: True real_value: True
criterion: criterion:
type: RMSE type: L1loss
trainer: trainer:
type: trafficflowtrainer type: trafficflowtrainer
log_dir: ./ log_dir: ./

View File

@ -0,0 +1,73 @@
use_gpu: True
seed: 10
device: 0
early_stop:
patience: 60
federate:
mode: standalone
total_round_num: 70
client_num: 10
data:
root: data/trafficflow/PeMS03
type: trafficflow
splitter: trafficflowprediction
num_nodes: 358
lag: 12
horizon: 12
val_ratio: 0.2
test_ratio: 0.2
tod: False
normalizer: std
column_wise: False
default_graph: True
add_time_in_day: True
add_day_in_week: True
steps_per_day: 288
days_per_week: 7
dataloader:
type: trafficflow
batch_size: 64
drop_last: True
model:
type: FedDGCN
task: TrafficFlowPrediction
dropout: 0.1
horizon: 12
num_nodes: 0
input_dim: 1
output_dim: 1
embed_dim: 10
rnn_units: 64
num_layers: 1
cheb_order: 2
use_day: True
use_week: True
train:
batch_or_epoch: 'epoch'
local_update_steps: 1
optimizer:
type: 'Adam'
lr: 0.003
weight_decay: 0.0
batch_size: 64
epochs: 300
lr_init: 0.003
weight_decay: 0
lr_decay: False
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
early_stop: False
early_stop_patience: 15
grad_norm: True
max_grad_norm: 5
real_value: True
criterion:
type: L1Loss
trainer:
type: trafficflowtrainer
log_dir: ./
grad:
grad_clip: 5.0
eval:
metrics: ['avg_loss']

View File

@ -0,0 +1,74 @@
use_gpu: True
seed: 10
device: 0
early_stop:
patience: 60
federate:
mode: standalone
total_round_num: 70
client_num: 10
#personalization:
# local_param: ['D_i_W_emb', "T_i_D_emb", "encoder1", "encoder2", "node_embeddings1", "node_embeddings2"]
data:
root: data/trafficflow/PeMS04
type: trafficflow
splitter: trafficflowprediction
num_nodes: 307
lag: 12
horizon: 12
val_ratio: 0.2
test_ratio: 0.2
tod: False
normalizer: std
column_wise: False
default_graph: True
add_time_in_day: True
add_day_in_week: True
steps_per_day: 288
days_per_week: 7
dataloader:
type: trafficflow
batch_size: 64
drop_last: True
model:
type: FedDGCN
task: TrafficFlowPrediction
dropout: 0.1
horizon: 12
num_nodes: 0
input_dim: 1
output_dim: 1
embed_dim: 10
rnn_units: 64
num_layers: 1
cheb_order: 2
use_day: True
use_week: True
train:
batch_or_epoch: 'epoch'
local_update_steps: 1
optimizer:
type: 'Adam'
lr: 0.003
weight_decay: 0.0
batch_size: 64
epochs: 300
lr_init: 0.003
weight_decay: 0
lr_decay: False
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
early_stop: False
early_stop_patience: 15
grad_norm: True
max_grad_norm: 5
real_value: True
criterion:
type: L1Loss
trainer:
type: trafficflowtrainer
log_dir: ./
grad:
grad_clip: 5.0
eval:
metrics: ['avg_loss']

View File

@ -0,0 +1,71 @@
use_gpu: True
seed: 10
device: 0
early_stop:
patience: 60
federate:
mode: standalone
total_round_num: 70
client_num: 10
data:
root: data/trafficflow/PeMS08
type: trafficflow
splitter: trafficflowprediction
num_nodes: 170
lag: 12
horizon: 12
val_ratio: 0.2
test_ratio: 0.2
tod: False
normalizer: std
column_wise: False
default_graph: True
add_time_in_day: True
add_day_in_week: True
steps_per_day: 288
days_per_week: 7
dataloader:
type: trafficflow
batch_size: 64
drop_last: True
model:
type: FedDGCN
task: TrafficFlowPrediction
dropout: 0.1
horizon: 12
num_nodes: 0
input_dim: 1
output_dim: 1
embed_dim: 10
rnn_units: 64
num_layers: 1
cheb_order: 2
use_day: True
use_week: True
train:
batch_or_epoch: 'epoch'
local_update_steps: 1
optimizer:
type: 'Adam'
lr: 0.01
weight_decay: 0.0
batch_size: 64
epochs: 300
lr_init: 0.003
lr_decay: False
lr_decay_rate: 0.3
lr_decay_step: 5,20,40,70
early_stop: False
early_stop_patience: 15
grad_norm: True
real_value: True
criterion:
type: L1loss
trainer:
type: trafficflowtrainer
log_dir: ./
grad:
grad_clip: 5.0
eval:
metrics: ['avg_loss']