Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions baselines/HimNet/METR-LA.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
CFG = EasyDict()
# General settings
CFG.DESCRIPTION = 'An Example Config'
CFG.GPU_NUM = 8 # Number of GPUs to use (0 for CPU mode)
CFG.GPU_NUM = 1 # Number of GPUs to use (0 for CPU mode)
# Runner
CFG.RUNNER = HimNetRunner

Expand Down Expand Up @@ -96,7 +96,7 @@
CFG.MODEL.PARAM = MODEL_PARAM
CFG.MODEL.FORWARD_FEATURES = [0, 1, 2]
CFG.MODEL.TARGET_FEATURES = [0]
CFG.MODEL.SETUP_GRAPH = True
CFG.MODEL.SETUP_GRAPH = False

############################## Metrics Configuration ##############################

Expand Down
4 changes: 2 additions & 2 deletions baselines/HimNet/PEMS-BAY.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
CFG = EasyDict()
# General settings
CFG.DESCRIPTION = 'An Example Config'
CFG.GPU_NUM = 8 # Number of GPUs to use (0 for CPU mode)
CFG.GPU_NUM = 1 # Number of GPUs to use (0 for CPU mode)
# Runner
CFG.RUNNER = HimNetRunner

Expand Down Expand Up @@ -96,7 +96,7 @@
CFG.MODEL.PARAM = MODEL_PARAM
CFG.MODEL.FORWARD_FEATURES = [0, 1, 2]
CFG.MODEL.TARGET_FEATURES = [0]
CFG.MODEL.SETUP_GRAPH = True
CFG.MODEL.SETUP_GRAPH = False

############################## Metrics Configuration ##############################

Expand Down
4 changes: 2 additions & 2 deletions baselines/HimNet/PEMS03.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
CFG = EasyDict()
# General settings
CFG.DESCRIPTION = 'An Example Config'
CFG.GPU_NUM = 8 # Number of GPUs to use (0 for CPU mode)
CFG.GPU_NUM = 1 # Number of GPUs to use (0 for CPU mode)
# Runner
CFG.RUNNER = HimNetRunner

Expand Down Expand Up @@ -96,7 +96,7 @@
CFG.MODEL.PARAM = MODEL_PARAM
CFG.MODEL.FORWARD_FEATURES = [0, 1, 2]
CFG.MODEL.TARGET_FEATURES = [0]
CFG.MODEL.SETUP_GRAPH = True
CFG.MODEL.SETUP_GRAPH = False

############################## Metrics Configuration ##############################

Expand Down
4 changes: 2 additions & 2 deletions baselines/HimNet/PEMS04.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
CFG = EasyDict()
# General settings
CFG.DESCRIPTION = 'An Example Config'
CFG.GPU_NUM = 8 # Number of GPUs to use (0 for CPU mode)
CFG.GPU_NUM = 1 # Number of GPUs to use (0 for CPU mode)
# Runner
CFG.RUNNER = HimNetRunner

Expand Down Expand Up @@ -96,7 +96,7 @@
CFG.MODEL.PARAM = MODEL_PARAM
CFG.MODEL.FORWARD_FEATURES = [0, 1, 2]
CFG.MODEL.TARGET_FEATURES = [0]
CFG.MODEL.SETUP_GRAPH = True
CFG.MODEL.SETUP_GRAPH = False

############################## Metrics Configuration ##############################

Expand Down
4 changes: 2 additions & 2 deletions baselines/HimNet/PEMS07.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
CFG = EasyDict()
# General settings
CFG.DESCRIPTION = 'An Example Config'
CFG.GPU_NUM = 8 # Number of GPUs to use (0 for CPU mode)
CFG.GPU_NUM = 1 # Number of GPUs to use (0 for CPU mode)
# Runner
CFG.RUNNER = HimNetRunner

Expand Down Expand Up @@ -96,7 +96,7 @@
CFG.MODEL.PARAM = MODEL_PARAM
CFG.MODEL.FORWARD_FEATURES = [0, 1, 2]
CFG.MODEL.TARGET_FEATURES = [0]
CFG.MODEL.SETUP_GRAPH = True
CFG.MODEL.SETUP_GRAPH = False

############################## Metrics Configuration ##############################

Expand Down
4 changes: 2 additions & 2 deletions baselines/HimNet/PEMS08.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
CFG = EasyDict()
# General settings
CFG.DESCRIPTION = 'An Example Config'
CFG.GPU_NUM = 8 # Number of GPUs to use (0 for CPU mode)
CFG.GPU_NUM = 1 # Number of GPUs to use (0 for CPU mode)
# Runner
CFG.RUNNER = HimNetRunner

Expand Down Expand Up @@ -96,7 +96,7 @@
CFG.MODEL.PARAM = MODEL_PARAM
CFG.MODEL.FORWARD_FEATURES = [0, 1, 2]
CFG.MODEL.TARGET_FEATURES = [0]
CFG.MODEL.SETUP_GRAPH = True
CFG.MODEL.SETUP_GRAPH = False

############################## Metrics Configuration ##############################

Expand Down
2 changes: 1 addition & 1 deletion basicts/runners/base_epoch_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def inference_pipeline(self, cfg: Optional[Dict] = None, input_data: Union[str,
result = self.inference(save_result_path=output_data_file_path)

inference_end_time = time.time()
self.update_epoch_meter('inference/time', 'inference', inference_end_time - inference_start_time)
self.update_epoch_meter('inference/time', inference_end_time - inference_start_time)

self.print_epoch_meters('inference')

Expand Down
2 changes: 2 additions & 0 deletions basicts/runners/base_tsf_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def setup_graph(self, cfg: Dict, train: bool):

dataloader = self.build_test_data_loader(cfg=cfg) if not train else self.build_train_data_loader(cfg=cfg)
data = next(iter(dataloader)) # get the first batch
if not train:
self.model.eval()
self.forward(data=data, epoch=1, iter_num=0, train=train)

def count_parameters(self):
Expand Down