Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 2913214

Browse files
committed
add option for number of n_gsps dynamic
1 parent d986026 commit 2913214

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nowcasting_dataset/manager/manager_live.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import multiprocessing
55
from datetime import datetime
66
from functools import partial
7-
from typing import List
7+
from typing import List, Optional
88

99
import numpy as np
1010
import pandas as pd
@@ -47,7 +47,7 @@ class ManagerLive(ManagerBase):
4747
"""
4848

4949
def create_files_specifying_spatial_and_temporal_locations_of_each_example(
50-
self, t0_datetime: datetime
50+
self, t0_datetime: datetime, n_gsps: Optional[int] = N_GSPS
5151
) -> None:
5252
"""Creates CSV files specifying the locations of each example if those files don't exist yet.
5353
@@ -66,8 +66,8 @@ def create_files_specifying_spatial_and_temporal_locations_of_each_example(
6666
datetimes_for_split = [t0_datetime]
6767

6868
path_for_csv = self.config.output_data.filepath / split_name
69-
# TODO make dynamic
70-
n_batches_requested = int(np.ceil(N_GSPS / self.config.process.batch_size))
69+
70+
n_batches_requested = int(np.ceil(n_gsps / self.config.process.batch_size))
7171

7272
n_examples = n_batches_requested * self.config.process.batch_size
7373
logger.debug(

0 commit comments

Comments
 (0)